# Debug Array

**URL:** <https://discuss.elastic.co/t/debug-array/238857>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [June 26, 2020, 12:38pm UTC](https://discuss.elastic.co/t/debug-array/238857 "2020-06-26T12:38:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Stark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_stark/32/45777_2.png) [@Joe\_Stark](https://discuss.elastic.co/u/Joe_Stark)\
**Post date:** [June 26, 2020, 12:38pm UTC](https://discuss.elastic.co/t/debug-array/238857/1 "2020-06-26T12:38:39Z")

</div>

I am trying to debug an array filter but I can't seem to get the array formatting correct.

\<SearchProvider config={debug=true}\>

window.searchUI.addFilter("departmentid", "[20532037, 70960001,20612300,54399007]", "any");

How should the string of number be formatted?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [July 1, 2020, 11:59am UTC](https://discuss.elastic.co/t/debug-array/238857/2 "2020-07-01T11:59:50Z")

</div>

Hey @Joe_Stark,

What does the data in the "departmentid" field look like? Assuming it's something like the following:

```auto
{
  "departmentid": ["20532037", "70960001" , "20612300", "54399007"] 
}

```

And you are trying to apply multiple values, you would do them one at a time:

```auto
window.searchUI.addFilter("departmentid", "20532037", "any");
window.searchUI.addFilter("departmentid", "70960001", "any");
window.searchUI.addFilter("departmentid", "20612300", "any");
window.searchUI.addFilter("departmentid", "54399007", "any");

```

---

<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:** [July 29, 2020, 11:59am UTC](https://discuss.elastic.co/t/debug-array/238857/3 "2020-07-29T11:59:51Z")

</div>

Closed on July 29, 2020, 11:59am UTC

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