Lets suppose, we have collection called posts
{
"_id": ObjectId("5146bb52d8524270060001f3"),
"post_text":"This is a sample post" ,
"user_name": "mark",
"post_privacy": "public",
"post_likes_count": 0
},
{
"_id": ObjectId("5146bb52d8524270060001f4"),
"post_text": "This is a sample post",
"user_name": "pramod",
"post_privacy": "public",
"post_likes_count": 0
}
lets assume we have same table in mysql. I want same query of sql result into mongo.
query is: select post_likes_count from posts where user_name="mark";
How we can get same result in mongodb?