Extract field from mongodb query result set
How to extract json field from query response in node js? I have a query:- const Allposts = await Post.aggregate([pipeline]) Allposts:- { _id: 1, type: 'A', source: 'B', status: 'C', totalCount: 7, createdAt: 2022-04-13T17:12:28.097Z, updatedAt: 2022-04-13T17:12:28.097Z, __v: 0 }, {…