Getting specific column results
Hi guys, how do i return a list of objects containing specified columns instead of the whole record itself? Thanks guys!
4 Replies
Hey @rochel3 , you can map over the results in your function:
In this example only the
name
and completed
columns are returned.Hey @Michal Srb thanks for the quick reply
This was my work around, im not sure if it is efficient
It is efficient (and similar to the code I gave - if you're gonna .push() you can use forEach() instead of map())
thanks man!