# Parsing Nested JSONS

**URL:** <https://discuss.elastic.co/t/parsing-nested-jsons/189470>\
**Category:** Kibana\
**Created:** [July 9, 2019, 7:18am UTC](https://discuss.elastic.co/t/parsing-nested-jsons/189470 "2019-07-09T07:18:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 9, 2019, 7:18am UTC](https://discuss.elastic.co/t/parsing-nested-jsons/189470/1 "2019-07-09T07:18:20Z")

</div>

I have the following JSON Structure:  
{  
"\_index": "my\_reports",  
"\_type": "\_doc",  
"\_id": "ZNDj0GsOIHTBt-YGGDR",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"@timestamp": "2019-07-08T09:21:32.352Z",  
"@version": "1",  
"config-name": "Hello team my",  
"contact-number": "909900998709",  
"my-type": "Hello my test",  
"Team Details": {  
"Developers": [{  
"Name": "ABC",  
"description": "Developers Team",  
"tags": "4.1",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Available"  
}, {  
"Name": "XYZ",  
"description": "Developers Team",  
"tags": "4.2",  
"resource\_dependency": "LOW",  
"resource\_availabilty": "Available"  
}, {  
"Name": "XXX",  
"description": "Developers Team",  
"tags": "4.3",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Available"  
}, {  
"Name": "yyy",  
"description": "Developers Team",  
"tags": "4.4",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Not-Available"  
}],  
"Testers": [{  
"Name": "yyy",  
"description": "QA Team",  
"tags": "4.5",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Not-Available"  
}, {  
"Name": "yyy",  
"description": "QA Team",  
"tags": "4.6",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Available"  
}, {  
"Name": "yyy",  
"description": "QA Team",  
"tags": "4.7",  
"resource\_dependency": "HIGH",  
"resource\_availabilty": "Not-Available"  
}]  
}  
},  
"fields": {  
"@timestamp": ["2019-07-08T09:21:32.352Z"]  
},  
"sort": [1562577687652]  
}

Apologies for the long json.  
I want to create a pie chart to show the resources that are available and not-available, something like below:  
 ![Pie_Chart](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4cfadb23f3c3cf9c7c88536d3554d1679f78061a.png)

How could I achieve this , because I was not able to get this using term aggregation.  
If I use term aggregation my Pie Chart always shows 50% for both available and not available, secondly I would like to understand the best approach to parse such jsons.

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [July 9, 2019, 3:21pm UTC](https://discuss.elastic.co/t/parsing-nested-jsons/189470/2 "2019-07-09T15:21:32Z")

</div>

Hello,

You may want to follow this [Github thread](https://github.com/elastic/kibana/issues/3333) and consider the linked plugin in the thread to handle objects nested in an array

Regards,  
Aaron

---

<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:** [August 6, 2019, 3:21pm UTC](https://discuss.elastic.co/t/parsing-nested-jsons/189470/3 "2019-08-06T15:21:48Z")

</div>

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