组合条件查询json格式语法
{ "$and": [ { "Date": { $gt: ISODate("2015-06-05T00:45:00.00"), $lt: ISODate("2015-06-05T00:50:00.00") } }, { "ObjID": 406 } ] }
mongodb数据导入导出
F:mongodbin>mongoexport --query {"ObjID":411} -d gps_current -c gps -o 1. txt --port 27017 --host localhost connected to: localhost:27017 exported 9091 records
D:Winservicemongodb>mongoimport --host localhost --port 27017 --db gps_current_lhua -c gps --file 1.txt connected to: localhost:27017 2016-06-13T13:20:52.267+0800 check 9 9131 2016-06-13T13:20:52.275+0800 imported 9131 objects