Dy_Vanrith
(Dy Vanrith)
January 16, 2024, 3:54am
1
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!!
jsanz
(Jorge Sanz)
January 31, 2024, 3:24pm
2
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}}
system
(system)
Closed
February 28, 2024, 3:25pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.