diff --git a/storage/mysql/68-mysql.js b/storage/mysql/68-mysql.js index 685fea72..5dc116eb 100644 --- a/storage/mysql/68-mysql.js +++ b/storage/mysql/68-mysql.js @@ -153,6 +153,9 @@ module.exports = function(RED) { if ((rows.constructor.name === "OkPacket") || (rows.constructor.name === "Array")) { msg.payload = JSON.parse(JSON.stringify(rows)); } + else if ((rows.constructor.name === "OkPacket") || (rows.constructor.name === "Array")) { + msg.payload = rows.map(v => Object.assign({}, v)); + } else { msg.payload = rows; } node.send(msg); status = {fill:"green",shape:"dot",text:"OK"}; diff --git a/storage/mysql/package.json b/storage/mysql/package.json index 7f117ffc..2ccf49bc 100644 --- a/storage/mysql/package.json +++ b/storage/mysql/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-mysql", - "version": "0.1.4", + "version": "0.1.5", "description": "A Node-RED node to read and write to a MySQL database", "dependencies": { "mysql": "^2.18.1"