{
"entities" : {
"hashtags" : [
{
"text" : "NightToInspire",
"indices" : [
38,
53
]
}
],
"symbols" : [ ],
"user_mentions" : [
{
"screen_name" : "AFC_Foundation",
"name" : "TheArsenalFoundation",
"id" : 570099076,
"id_str" : "570099076",
"indices" : [
20,
35
]
},
{
"screen_name" : "Arsenal",
"name" : "Arsenal FC",
"id" : 34613288,
"id_str" : "34613288",
"indices" : [
57,
65
]
}
]
}
How would I go about querying this nested JSON array(subset of what was actually returned) from the twitter api to get both screen_name’s that appear in the array. Using a db.collection.find(“something”) format
2
Answers
Something like this may help,
Not sure if you absolutely need to use find() but aggregate would work: