balderdashy / balderdashy/sails
How to import json data into the mongodb with key through sails js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 22.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
"sails": "^1.2.3",
"sails-hook-grunt": "^4.0.0",
"sails-hook-orm": "^2.1.1",
"sails-hook-sockets": "^2.0.0",
"sails-mongo": "^1.1.0",
I'm trying to import the language list json data into the mongodb with key through sails js.
But something is went wrong. I attached my snapshot of the code.

The collection is created in the database. But the values are null in the database.
Like this...
{
"ts": 1581942054,
"success": true,
"error": false,
"data": {
"createdAt": 1581942052049,
"updatedAt": 1581942052049,
"id": "5e4a85241c6baa4ed0e8e229",
"languageCode": "",
"languageName": "",
"nativeName": "",
"userId": null,
"createdBy": null,
"updatedBy": null,
"deletedBy": null
}
}
Please help me out from this....
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the attached code snapshot and the Sails model/import path described in the issue; no repository files or tests are named. Reproduce the import with the supplied language JSON and compare the input fields with the stored document; done means the language fields are persisted with their intended values instead of empty strings or nulls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100