I am trying to pull a random item out of an array from a json webhook request. I've got the following done:
{{#=}}RANDOM(){{/}}{{webhookResponse.body.size}}{{#=}}FLOOR({{listSize}} * {{rand}}){{/}}{{newIndex.asNumber}}{{webhookResponse.body.get(newIndex)}Unfortunately, this doesn't work at all. I've tried variations like:
{{webhookResponse.body.get({{newIndex}})}}
When I just use a raw literal number, it works fine. e.g.,
{{webhookResponse.body.get(0)}} Not really helpful if I'm building a random function, basically.
Am I missing some nuance about the syntax here? Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.