In my MongoDB, I have a student collection with 10 records having fields name and roll. One record of this collection is:
name
roll
{ \"
_id = "123321"; _user = await likes.find({liker_id: _id},{liked_id:"$liked_id"}); ; let suppose you have liker_id and liked_id field in the document so by putting "$liked_id" it will return _id and liked_id only.
_id = "123321"; _user = await likes.find({liker_id: _id},{liked_id:"$liked_id"}); ;