How to format string in array?

I have the query with various values. Ex:

“data”: [
{
“PID”: “123456”
},
{
“PID”: “1234567”
},
{
“PID”: “12345678”
},
{
“PID”: “123456789”
}
]
},

I need format this value in: [‘123456’, ‘1234567’, ‘12345678’, ‘123456789’]

How to make this?

You could try 'data.values()'

1 Like

Error: “status”: “500”,
“message”: “Parser Error: Formatter “pixelID” does not exist, expression {{data.query[0].pixelID()}}”

I’m using set-value!

Can you post your server connect steps?

It may well be that you need something like:

data.query.values('pixelID')

I need to convert the strings in the database into a single array to insert into 1 argument in the java script.

Where you have the parameter properties, make sure you choose the pixelID from the set value step (should be later in the list) rather than the query. If you have the [0] then it’s the wrong one.

Its look like this: data.query.values(query[0].pixelID) ?

A list similar to the previous one appeared, however, it cannot contain these { and }.

It looks like it should be query.values('pixelID') for the set value

Returned [
{
“pixelID”: “51515151512”
},
{
“pixelID”: “656545646”
},
{
“pixelID”: “123451234523”
},
{
“pixelID”: “21312”
}
]

Actually try:
query.flatten('pixelID')

1 Like

Its perfect bro!!!

1 Like

I need convert " in ’ for script run. <- solved!