1

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?

Brian
  • 14,610
  • 7
  • 35
  • 43
Learner
  • 47
  • 3

1 Answers1

3

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

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

Use the following in your message template:

{{#arr}}

cfs
  • 10,610
  • 3
  • 30
  • 43
Ewan Dennis
  • 396
  • 1
  • 3