I am trying to export a subset of documents that contain a specific ObjectId from a collection of Twitter searches. To do this, I am using the following script:
mongoexport --db twitter --collection tweets --csv --fieldFile CSVfields.txt --out .\tweets.csv --query query.txt
...where CSVfields.txt references the specific document keys that I want in the export and query.txt contains:
{ "search" : ObjectId("525f9cfdb3685db029000001") }
When I run this, I get an error saying:
assertion: 16619 code FailedToParse: FailedToParse: Expecting '{': offset:0
Any idea what I am doing wrong?
Thanks!