I am creating a route in node.js
and this is my code:
schedule.get('/conference/schedule_participants/:circle/:schedId', function(req, res) {
if(req.schedId){
getParticipants( req.params, function(contacts){
results.contacts=contacts;
res.json(results);
});
}else{
res.json(results);
}
});
the output in my browser is like this :
"schedSetting":{
"id":59,
"sched_date":"2016-03-03 09:03:00",
"agenda":"meeting",
},
"contacts":[
{
"id":218,
"accountcode":"",
"extentype":0,
},
}
]
}
How can i remove the schedSetting array so that my output will only be the contacts array like this :
"contacts":[
{
"id":218,
"accountcode":"",
"extentype":0,
},
}
]
Thanks :)
delete(results['schedSetting'])?resultsserver side in the first place?