Im trying to get a json obj into a json table (via node js)
in the end it should look like (2 layered object)
{
"Name": "bla",
"List": "bla",
"info": {
"info1": "bla",
"info2": "bla"
}
"Adress": "bla"
}
i'll get the info just via
info = get.body;
i'm adding it via
db.collection('profiles', function(err, collection) {
collection.update({"email": email},{$set: item}, function(err, result)
it results in an one layered json object
Question Closed
solution:
var info = req.body;
var insert = { "contact_info": info };