Javascript : Json traversing list

Hello, I wan’t to return minimal object[price] on all these object list, I use javascript but I think list indexing is bugged

the api used is :

thank for the help.

items is a string value, not an array. You should use JSON.parse(p1) to get data, but better yet, use the Transform JSON plugin:

1 Like

hey, thank for your response but i tried the 2 options and no one works

have you another idea ?

You can use this jq query in the original column if what you want is just the 1st id.

1 Like


const data = JSON.parse(p1);
return data[0];
1 Like

to explain I search to compare all “price” in this api so I think I need to use javascript

thank for your response but same when i just want to get data, it returns nothing

Ah that’s true. Yeah I think Javascript is needed.

1 Like

Here you go. First I returned a list of prices from the API.

Then use JavaScript to get the minimum from the array.

const arr = p1.replace("[","").replace("]","").split(",");
const min = Math.min(...arr)
return min;
1 Like

Is a way to send a notification with these data ?

If you’re talking about native notifications then no.

If it’s not native notification then please elaborate on what type of notification you want people to receive.

yes i was talking about native notification so thank you for your help and have a good day

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.