Sequelize, convert entity to plain object
I'm not very familiar with javascript, and stunning, because i can't add new property, to object, that fetched from database using ORM names Sequelize.js. To avoid this, i use this hack: 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); }); So, what normally way to add new properties to object.
https://stackoverflow.com/questions/21961818/sequelize-convert-entity-to-plain-object