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