Pass array to search template

I have a search template and now I need to pass some parameters. Strings are no problem, but how do I pass an array?

In the documentation I found that I need to use {{#toJson}}. But this seems not to work.

Search template:
"filter": [
"terms": "{{#toJson}}types{{/toJson}}"

"types": {
"type": ["type1","type2","type3"]

Anybody has a solution for passing an array to the search template ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.