# Does Tag cloud support arrays as an input?

**URL:** <https://discuss.elastic.co/t/does-tag-cloud-support-arrays-as-an-input/155420>\
**Category:** Kibana\
**Created:** [November 5, 2018, 3:02pm UTC](https://discuss.elastic.co/t/does-tag-cloud-support-arrays-as-an-input/155420 "2018-11-05T15:02:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elhamroshan](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@elhamroshan](https://discuss.elastic.co/u/elhamroshan)\
**Post date:** [November 5, 2018, 3:02pm UTC](https://discuss.elastic.co/t/does-tag-cloud-support-arrays-as-an-input/155420/1 "2018-11-05T15:02:11Z")

</div>

Hi,

I'm interested to know if I can give an array of string as an input to a tag cloud visualization?

I expect Kibana then to consider each individual item of this array for each document, as an individual input. For example:

doc1.fieldX = [dog, cat, fox]  
doc2.fieldX = [sheep, cow, dog]  
doc3.fieldX = [mouse, dog, cow]

the counts for each value in the tag cloud for fieldX as input:

dog = 3  
cow = 2  
cat, mouse, sheep, fox = 1

Thanks,  
Ellie

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 5, 2018, 3:14pm UTC](https://discuss.elastic.co/t/does-tag-cloud-support-arrays-as-an-input/155420/2 "2018-11-05T15:14:55Z")

</div>

Yes, the tag cloud visualization will work on fields that contain arrays of [Keywords](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/keyword.html).

To verify this, I used Kibana `dev tools` to insert some documents into an index and then created a tag cloud. Dev tools is a great way to quickly experiment with the Elasticsearch API.

```auto
PUT example/_doc/1
{
    "fieldX" : ["dog", "cat", "fox"]
}

PUT example/_doc/2
{
    "fieldX" : ["sheep", "cow", "dog"]
}

PUT example/_doc/3
{
    "fieldX" : ["mouse", "dog", "cow"]
}

```

 ![36%20AM](https://us1.discourse-cdn.com/elastic/original/3X/f/4/f4d08eadaa64553f676f7347577365b5f8dc3781.png)

---

<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:** [December 3, 2018, 3:15pm UTC](https://discuss.elastic.co/t/does-tag-cloud-support-arrays-as-an-input/155420/3 "2018-12-03T15:15:00Z")

</div>

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