i am facing problem when i insert array of object in mongodb
myarray = [
{ id: 213,
name: 'MonaCoin',
symbol: 'MONA',
price: 0.629564688986,
volume: 2226709.2039523,
last_update: '2018-12-03T18:45:04.000Z' },
{ id: 1169,
name: 'PIVX',
symbol: 'PIVX',
price: 0.706248118629,
volume: 310213.338790205,
last_update: '2018-12-03T18:45:08.000Z' },
{ id: 2062,
name: 'Aion',
symbol: 'AION',
price: 0.1502951806,
volume: 1827674.44495399,
last_update: '2018-12-03T18:45:17.000Z' },
{ id: 1727,
name: 'Bancor',
symbol: 'BNT',
price: 0.655718694418,
volume: 1598779.80773313,
last_update: '2018-12-03T18:45:11.000Z' }
]
and the function i used are "insertmany" "create" and "save" function:
myschema.insertmany(myarray,(err,obj)=>{
console.log("saved"obj)
})
it show saved but no data saved in mongodb, please tell me what is the best approach for this scenario.