On Massage:
let price = msg.payload.records.deGs[0][1]
msg.payload = (price <= 0.0) ? 1 : 0
let fill = 'red'
let text = 'Nope, positive price'
if (msg.payload) {
fill = 'green'
text = 'Yes! Negative price'
}
text += ‘: €’ + price.toFixed(2)
node.status({fill, shape: ‘dot’, text})
return msg;


