Try to search your question here, if you can't find : Ask Any Question Now ?

How to take the count object inside object using mongodb

HomeCategory: stackoverflowHow to take the count object inside object using mongodb
Avatarpragati asked 4 months ago
/* 1 */
{
    "_id" : "123",
    "gallary" : {
        "profilepic" : [
            "200"
        ]
    }
},

My requirement is suppose gallary.profilepic is object {}

Expected output:

count : 3

Note: _id 456 profilepic an object so we have to take count (2) & 789 profilepic is an object so we have to take count (1) so output should come 2 + 1 = 3

1 Answers
Best Answer
AvatarMannu answered 4 months ago
Your Answer

16 + 3 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com