Specific item in a collection

I am trying to use an api to split the url and lookup some data. To lookup what I need I need to get a specific number item returned.

I get this data back

and want to grab the second and third item and put them as their own values.

The third item will sometimes not be included, and I want it to return a null or such so using “Last” won’t work.

I assume I need to use this -

but I don’t know what I should set for the values. Looking into it this may be for maps or objects?

Any help on how to properly set it up would be appreciated.

Just pseudo code as not at desk but you can use url_split.count() to measure length of the array then use something like below and reference the elements directly

If url_split.count() =2
Set value param1 = url_split[0]
Set value param2 =url_split[1]
Set value param3 =""
else
Set value param1 = url_split[0]
Set value param2 =url_split[1]
Set value param3 = url_split[2]

1 Like

That works, thanks for the help!

1 Like