Loop array in table markdown canvas kibana

Hello friend
I have array value
example arr = [1, 4, 7]

and in canvas kibana i want to loop array in markdown
here my code expression


{{#each rows}}

| All In Array |

|---------------|

{{arr}}

{{/each}}

but it loop only first index that value = 1
please help thank in advance!!

This worked for me:

Create some data as you shared

PUT discuss-351116
{
  "mappings": {
    "properties": {
      "value": { "type": "integer"}
    }
  }
}

POST discuss-351116/_bulk
{ "index": {}}
{ "value": 1}
{ "index": {}}
{ "value": 4}
{ "index": {}}
{ "value": 7}

Then in Canvas create a text element with this SQL

SELECT value FROM "discuss-351116"

And the following markdown definition:

| value |
| :--:  |
{{#each rows}}
| {{value}} |
{{/each}}

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