I have the following collections in my DB:
>db.event.find();
{ "_id" : ObjectId("5885eebeee7bce0b889976f0"), "_class" : "com.test.model.Ev
ent", "name" : "Event", "place" : "Berlin", "date" : ISODate("2017-03-01T23:00:00Z"), "speeches" : [ ], "attendees" : [ ], "links" : [ ] }
I want to create a mongoexport statement that exports to a csv only documents with particular date ISODate("2017-03-01T23:00:00Z")
I currently have the following command:
mongoexport --db event --collection event --query '{date{$gte:ISODate("2017-03-01T23:00:00Z")}}' --type=csv --fields _id,attendees,date --out "c:\myfile.csv"
But I get an error. The error message looks like this:
2017-01-23T15:46:35.033+0100 error validating settings:
query '[39 123 100 97 116 101 58 123 36 103 116 101 58 73 83 79 68 97 116 101 40 50 48 49 54 45 48 54 45 48 53 84 49 53 58 49 52 58 50 50 46 49 54 51 90 41 125 125 39]' is not valid JSON:
json: cannot unmarshal string into Go value of type map[string]interface {}
What's that about? Please help me:(