How to tell the query to include specific fields
Ideally I want to specify the fields in the query, not in the return. Akin to select firstname, lastname from people where... as opposed to what is happening now which is select * from people where...
What I tried based on AI.
export default query(async (ctx) => {
console.log("Write and test your query function here!");
return await ctx.db.query("people").map((person) => ({
nameFirst: person.name_first
})).collect();
})What get - Server Error
Uncaught TypeError: ctx.db.query(...).map is not a function
