Reputation: 1227
Following Json is from Mongodb by querying collection.find() method. How do I convert this Json into Dictionary in Python? I want to map BMW as key and Series 3 as value in my dictionary.
Python:
content = list(collection.find({"_id": "sample_abc"}, {"Car":1, "_id":0}))
print (content)
Console:
[{'Car': [{'BMW': 'series 3'}, {'Audi': 'A4'}]}]
Upvotes: 0
Views: 114