Imprimir desde la consola Mongo a archivo sample.json
mongo localhost:27020/miscdb --eval "printjson(db.collection_name.findOne({}))" > sample.json
Homeless Heron
mongo localhost:27020/miscdb --eval "printjson(db.collection_name.findOne({}))" > sample.json
> EDITOR="cat > /tmp/x.json"
> x = db.MyCollection.find(...).toArray()
> edit x
>