Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- from pymongo import MongoClient
- client = MongoClient('localhost', 12345)
- db = client['er_db']
- collection_currency = db['er_collection']
- with open('some_json.json') as f:
- file_data = json.load(f)
- collection_currency.insert_many(file_data)
- client.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement