Why does Mongoose insert null as the last element of the subdocuments array?
replace for
loop with forEach
req.body.cards.forEach(item=>{userCards.cards.push(item)})
replace for
loop with forEach
req.body.cards.forEach(item=>{userCards.cards.push(item)})