MongoExport Error

For the life of me I cannot get MongoExport with --query to work. Ive tried many variations of single and double quotes and it just wont work, not sure whats wrong.

Here is the command

mongoexport --uri="mongodb+srv://preprod-shippingservice.xxxxx.mongodb.net/"  --username=chase --db=iHerb_GLS --collection=Gls_Pickup_Location --query="{"CarrierName":"Gaash"}" --type=json --out=B:\MongoExport\Itsd261730_BackupPreprod.json

And then examples of trying a mix of queries and variations of double and single quotes

The version with

--query='{"CarrierName" : "Gaash" }' should work.

I would try with version latest 100.5.4 version.

1 Like