db.Sensors.findAll({
where: {
nodeid: node.nodeid
}
}).success(function (sensors) {
var nodedata = JSON.parse(JSON.stringify(node)); // this is my trick
nodedata.sensors = sensors;
nodesensors.push(nodedata);
response.json(nodesensors);
});
Tokens.findAll({
where: { guid: req.query['guid'] }
}).then(tokens => {
console.log(tokens[0]['date'])
}).catch(err => console.log('erro: ' + err));;