# Just need to find the length of Array in DOC

**URL:** https://discuss.elastic.co/t/just-need-to-find-the-length-of-array-in-doc/249021
**Category:** Elasticsearch
**Created:** [September 17, 2020, 6:38pm UTC](https://discuss.elastic.co/t/just-need-to-find-the-length-of-array-in-doc/249021 "2020-09-17T18:38:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Md\_Iburahimsha\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/md_iburahimsha_s/32/47142_2.png) [@Md\_Iburahimsha\_S](https://discuss.elastic.co/u/Md_Iburahimsha_S)
#### Post date: [September 17, 2020, 6:38pm UTC](https://discuss.elastic.co/t/just-need-to-find-the-length-of-array-in-doc/249021/1 "2020-09-17T18:38:22Z")

</div>

## '''I have a doc, just need to get the length of array in kibana objects,' 'Query:''' ''' GET .kibana/\_search { "query": {"match": { "\_id" : "dashboard:Dashboard1" }} } ''' Query results:

'''  
{  
"\_index" : ".kibana\_1",  
"\_type" : "\_doc",  
"\_id" : "dashboard:Dashboard1",  
"\_score" : 3.0726933,  
"\_source" : {  
"dashboard" : {  
"description" : "",  
"hits" : 0,  
"kibanaSavedObjectMeta" : {  
"searchSourceJSON" : """{"filter":,"highlightAll":true,"version":true,"query":{"language":"kuery","query":""}}"""  
},  
"type" : "dashboard",  
"references" : [  
{  
"id" : "G0",  
"name" : "panel\_0",  
"type" : "visualization"  
},  
{  
"id" : "G1",  
"name" : "panel\_1",  
"type" : "visualization"  
},  
{  
"id" : "G2",  
"name" : "panel\_2",  
"type" : "visualization"  
},  
{  
"id" : "G3",  
"name" : "panel\_3",  
"type" : "visualization"  
},  
{  
"id" : "G4",  
"name" : "panel\_4",  
"type" : "visualization"  
},  
{  
"id" : "G5",  
"name" : "panel\_5",  
"type" : "visualization"  
},  
{  
"id" : "G6",  
"name" : "panel\_6",  
"type" : "visualization"  
}  
],  
"migrationVersion" : {  
"dashboard" : "7.3.0"  
},  
"updated\_at" : "2020-09-17T11:15:31.317Z"  
}  
}  
'''  
......

Just need to find "references" array length and search inside the each array value.

---

<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: [October 15, 2020, 6:38pm UTC](https://discuss.elastic.co/t/just-need-to-find-the-length-of-array-in-doc/249021/2 "2020-10-15T18:38:33Z")

</div>

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