My json data will look like this
{
"videoId": 29,
"videoComments": [
{
"comment": "awsome",
"userId": 15,
"commentTime": "2022-03-01T12:37:49.734Z",
"userName": "user1646127068323",
"deletedbyowner": "FALSE",
"_id": "621e139d8e4195079c86488",
"replyComments": [
{
"replyComment": "thank you",
"replyCommentTime": "2022-03-01T12:44:53.193Z",
"replyDeletedbyowner": "FALSE",
"_id": "621e154557fa7045e342540"
}
]
}
]
}
I need to match some conditions that I mentioned below :
- match "videoId" == "29"
- then match "videoComments.deletedbyowner" == "FALSE"
- if I match second condition then I need to match "videoComments.replyComments.replyDeletedbyowner" == "FALSE"
I can't use unwind because my boss told me that unwind is a costly operation it will effect the app performance. so with out using unwind I need to match these conditions. could you please help out of this.