Dezina Posted on Jan 12, 2022 3 3 Filter only one field in mongodb const jobData = await JobRequirement.find({cId: user.corporateId}, {_id: 1}) console.log("result", jobData) Enter fullscreen mode Exit fullscreen mode result [ { _id: 61d3e5dc0b2613ae328cc0c5 }, { _id: 61d3e66e0b2613ae328cc0c6 }, { _id: 61d3e74a0b2613ae328cc0c7 }, { _id: 61d556dc0b2613ae328cc169 }, { _id: 61d57dc20b2613ae328cc16a }, { _id: 61d580900b2613ae328cc16c }, { _id: 61d59a9d0b2613ae328cc16d }, { _id: 61d84bd90b2613ae328cc18f }, { _id: 61d84c700b2613ae328cc190 }, { _id: 61d92c710b2613ae328cc1ac }, { _id: 61d92ecd0b2613ae328cc1ad }, { _id: 61d947510b2613ae328cc1ae }, { _id: 61d996ef0595f55e1f4e0a40 } ] Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)