# Crating visualization with two arrays in a table

**URL:** https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054
**Category:** Kibana
**Created:** [February 3, 2021, 12:43am UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054 "2021-02-03T00:43:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![leinad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leinad/32/82281_2.png) [@leinad](https://discuss.elastic.co/u/leinad)
#### Post date: [February 3, 2021, 12:43am UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/1 "2021-02-03T00:43:59Z")

</div>

Hi ,  
I am trying to create a table with values from two arrays  
arr1[str1,str2,str30  
arr2[val1,val2,val3]

desired table should be as  
str1 - val1  
str2 - val2  
str3 - val3

and i have multiple such arrays in the json file input,  
when i create the table i am getting as  
str1-val1  
str1-val2  
str1-val3  
str2-val1  
str2-val2  
str2-val3  
str3-val1  
str3-val2  
str3-val3

can please help me what i should to do to get the desired output

---

<div class="post-metadata">

### Author: ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)
#### Post date: [February 4, 2021, 6:10am UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/2 "2021-02-04T06:10:18Z")

</div>

What are the mappings on your index? Are these fields already stored as arrays? Are you trying to create a Data table visualization, or Lens visualization or some other kind of table?

---

<div class="post-metadata">

### Author: ![leinad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leinad/32/82281_2.png) [@leinad](https://discuss.elastic.co/u/leinad)
#### Post date: [February 4, 2021, 7:14am UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/3 "2021-02-04T07:14:18Z")

</div>

Here is the data from my json file from the filebeat -\>logstash-\>elastic

i want to show data in each row of the table and its respective value on the next column,  
i am just a starter on kibana, thanks.

| | "loopdata":["data1","data2","data3","data4","data5"] |
| --- | --- |
| | "loopvalue":[117.8665534,118.588309,118.3033731,114.8643709,115.9260792] |

I am creating a data table visualization ,

this is the mapping i copied only for the two field  
"loopdata": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
},  
"loopvalue": {  
"type": "long"  
},

Another issue I have is "jobStartDateTime": "2021-02-02'T'15:50:41-00:00"  
is kibana is detecting as string and not as date by itself, is there any settings I need to change

---

<div class="post-metadata">

### Author: ![leinad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leinad/32/82281_2.png) [@leinad](https://discuss.elastic.co/u/leinad)
#### Post date: [February 8, 2021, 8:42am UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/4 "2021-02-08T08:42:22Z")

</div>

Hi @Patrick_Mueller is is possible to plot the data in the table format Thanks !

---

<div class="post-metadata">

### Author: ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)
#### Post date: [February 8, 2021, 3:22pm UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/5 "2021-02-08T15:22:28Z")

</div>

Here's a Discuss question + answer that's similar, regarding the array question: [VIsualize 2 array in data table](https://discuss.elastic.co/t/visualize-2-array-in-data-table/206017)

For the `jobStartDateTime`, you should set the mapping to a `date` field - [Date field type | Elasticsearch Reference [7.10] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/date.html)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 8, 2021, 3:23pm UTC](https://discuss.elastic.co/t/crating-visualization-with-two-arrays-in-a-table/263054/6 "2021-03-08T15:23:25Z")

</div>

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