Limit Items in JSON Value

Hi @patrick_k

Welcome to the community.

One way is to split it into an array and then choose which array Items you would like to get.
first we split: inputfield.split(";")
Result is an array of the Urls. You need to slice this array to get the first 5 items of the array.
then we slice: array.slice(0,4)
and again for the overflow: array.slice(5)
and then if you want the string again like you had you will have to join the values you sliced.
Join them both: slice.join(";")

all together now:
photo URL field: inputfield.split(";").slice(0,4).join(";")
Overflow field: inputfield.split(";").slice(5).join(";")

Hope this is clear. (might have made a typo somewhere, haven’t tested it.

3 Likes