Joining array values as a string

Hi there, I currently have this as an output:

[
  {
    "allData": [
      {
        "text": "Testing"
      },
      {
        "text": "Testing"
      }
    ]
  }
]

and I would like it to output

text: Testing, Testing

When I try

{{$json["allData"].join(', ')}}

all I get is:

[object Object], [object Object]

Any help is appreciated! Thanks!

Hey @djangelic, you’d need to join the text field rather than the full object. Here’s a quick example workflow doing this using the JS .map() method:

Example Workflow

Hope this helps! Give me a shout if you have any questions on this :slight_smile:

That works! However, I ended up using the Item list node to extract the array then call on the array values in the next node! Thanks for the help!