Requirement - Excel has 164 rows. I want each record in Excel to be inserted as a separate document in the MongoDB collection. However, the records are getting inserted as an array in the same document collection
Here is the JSON Input rawdata.json
{“data”:[{“SKU”:“SKU1234”,“Desc”:“Ganesh”,"Name ":“Name Desc”,“Test”:“Test fast”,“Test 2”:“Test Test 2”,“Test 3”:“Test Test 3”},{“SKU”:“SKU2345”,“Desc”:“John”,"Name ":“Mark”,“Test”:“Test fast”,“Test 2”:“Test Test 2”,“Test 3”:“Test Test 3”},{“SKU”:“SKU3456”,“Desc”:“Ganesh”,"Name ":“Thomas”,“Test”:“Test 2”,“Test 2”:“Test Test 2”,“Test 3”:“Test Test 3”}]}
Please share your workflow
Share the output returned by the last node
MongoDB Collection 1:
{
“_id”: {
“$oid”: “642f8acb9fc758951597c977”
},
"SKU": "SKU1234",
"Desc": "Ganesh",
"Name ": "Name Desc",
"Test": "Test fast",
"Test 2": "Test Test 2",
"Test 3": "Test Test 3"
}
MongoDB Collection 2:
{
“_id”: {
“$oid”: “642f8acb9fc75895159776977”
},
"SKU": "SKU2345",
"Desc": "John",
"Name ": "Mark",
"Test": "Test fast",
"Test 2": "Test Test 2",
"Test 3": "Test Test 3"
}
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: