I have this MongoDB document. In JSON:
{ "attString":"hello World0", "attInt":0, "attDate":new Date("1990-7-20") }
How to import this document into MongoDB using mongoimport ? I have a problem with the attDate field.
mongoimport
This is the MongoDB shell notification:
Error: Token cancellation error in file # 1: unexpected ISODate format
You must change your date format in JSON
Or
{"attString":"hello World0","attInt":0,"attDate":ISODate("2013-11-20T23:32:18Z")}
OR
{"attString":"hello World0","attInt":0,"attDate":{$date:"2013-11-20T23:32:18Z"}}
Hope this helps
Source: https://habr.com/ru/post/1233634/More articles:UISearchController only update when the search button is clicked - iosCXF 3 cache level - javaFacebook login with apple tv and smartphone - facebookHTTP headers do not change: yii2 - phpUnicode add-ons in JavaFX - javaHow to check if a function is clean? - javascriptHow to run a JavaScript function in a sandbox environment? - javascriptClick events do not work in Chrome, but the event fires when we fire it manually from the console - javascriptUsing a wildcard in an S3 event notification prefix - amazon-s3AWS S3 gracefully handles 403 after expiration getSignedUrl - http-status-code-403All Articles