What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-17 12:34:27
python import json into pymongo
import json from pymongo import MongoClient client = MongoClient('localhost', 27017) db = client['countries_db'] collection_currency = db['currency'] with open('currencies.json') as f: file_data = json.load(f) # if pymongo < 3.0, use insert() co... Add solution -
Javascript 2021-10-05 22:00:04
pymongo add json to collection
client = MongoClient('localhost', 27017) db = client['countries_db'] collection_currency = db['currency'] with open('currencies.json') as f: file_data = json.load(f) collection_currency.insert(file_data) # pymongo < 3.0 collection_currency.insert... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5