Can anyone help me with formatting?

I’m trying to format the following data:

[
    {
      "id": "123456789",
      "label": "123456789LB"
    },
    {
      "id": "123456",
      "label": "123456LB"
    },
    {
      "id": "1234567",
      "label": "1234567LB"
    }
  ]

to stay like this:

[
{ id: "123456789", label: "123456789LB" },
{ id: "123456", label: "123456LB" },
{ id: "1234567", label: "1234567LB" }
]

I tried to use map, but wappler doesn’t recognize it. I think I’m making a mistake somewhere.

However, it doesn’t matter the type of formatting, I just need it to stay that way as mentioned, I’ve been trying different formats for hours, but so far I haven’t been successful.

Hello,

Both are equivalent, the first is a JSON string, and the second is a JSON object. You can JSON encode and decode, I believe those formatters are not in the UI but you can search the forum

Stay using nodejs. Community have some PHP. :upside_down_face:

The only solution I found!

It doesn’t work at all and wappler keeps positioning the ‘’ between the code. Complicated.

I send: gads_pixels.map(gads_pixel => ({ id: gads_pixel.id, label: gads_pixel.label }))

Wappler return: ‘gads_pixels.map(gads_pixel => ({ id: gads_pixel.id, label: gads_pixel.label }))’

Can you show screenshots?