Need to get JSON arraySize in substitution Data

243 views Asked by At

I need to get size of array in substitution data. I tried to use local var outside each loop but it did not work. Is there some in build method to get array size in substitution data?

1

There are 1 answers

0
Ewan Dennis On BEST ANSWER

Try using # to return array length. Given this substitution data:

{
    "arr": [1, 2, 3]
}

Use the following in your message template:

{{#arr}}