Search code examples
javascriptarraysjsonnode-red

array object with empty field name


In node-red i have array object in msg.payload. the array object is [{"":"This Pallet ID is already in Pick Request List"}]

The array object has empty field name. please suggest how to retrieve value form the array. I have tried msg.payload[0][0], msg.payload[0].Value. But not working


Solution

  • What you need is

    var text = msg.payload[0][""];
    

    Works in Chrome at least...