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 : https://api.gtaliferp.fr:8443/v1/extinction/marketplace/sell/weapon_assaultrifle
thank for the help.
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 : https://api.gtaliferp.fr:8443/v1/extinction/marketplace/sell/weapon_assaultrifle
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:
const data = JSON.parse(p1);
return data[0];
to explain I search to compare all “price” in this api so I think I need to use javascript
Ah that’s true. Yeah I think Javascript is needed.
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;
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
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.