My json document is
{
"_id" : ObjectId("5b6049f845d12b6b62bf6fca"),
"original_query" : "",
}
I want to traverse each person who are in like field and then store their fb_id in a list using python.
I am new to mnogodb and JSON and any leads and help in building the necessary intution would be appreciated.
Edit:Code
import pymongo
from pymongo import MongoClient
import pprint
post=db.post
list_of_reactor_ids=[]
result=db.collection.find()
for doc in result:
list_of_reactor_ids=[]
for post in doc['posts']:
for reactor in like['reactors']:
list_of_reactor_ids.append(reactor[''])
print(list_of_reactor_ids)