# Nested objects - Handling

**URL:** https://community.siren.io/t/nested-objects-handling/161
**Category:** Building Investigative Solutions
**Created:** [November 23, 2019, 3:44am UTC](https://community.siren.io/t/nested-objects-handling/161 "2019-11-23T03:44:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mmuthukrishnan](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mmuthukrishnan](https://community.siren.io/u/mmuthukrishnan)
#### Post date: [November 23, 2019, 3:44am UTC](https://community.siren.io/t/nested-objects-handling/161/1 "2019-11-23T03:44:16Z")

</div>

Hello Everyone,

As we have a limitation on nested objects for aggregation and searches in siren, Need to know how to handle the nested objects.

Say for example you wanted to do a pie chart of gender. Gender is stored as an answer for Question 2.

You create a pie chart with the field answer.valuestring (which holds gender) but when you add that field to the pie it returns answer.valuestring FOR all questions.

Add a filter to the report - where item.linkID=2

The filter has no impact. Siren cannot compute the data . Even with a filter applied it shows on screen the results from every single question not just Q2.

 ![nested_objects](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/7148d4f1393afd2365deb67095911041e50b622d.jpeg)

Interested to see other than flattening the indices approach.

---

<div class="post-metadata">

### Author: ![ekeller](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/ekeller/32/40_2.png) [@ekeller](https://community.siren.io/u/ekeller)
#### Post date: [November 28, 2019, 4:12pm UTC](https://community.siren.io/t/nested-objects-handling/161/2 "2019-11-28T16:12:33Z")

</div>

Hi there !

First of all, thank you for testing Siren !

Can you tell us a little bit more about your environment ? Are you using a external database with a Virtual Index ? Or are you using a normal Elastic Search index ?

When using Virtual Indexes you will find useful to check in our documentation the current existing limitations:  
[https://docs.support.siren.io/10.3.3/platform/en/siren-federate/connecting-to-remote-datasources/connecting-to-jdbc-datasources.html](https://docs.support.siren.io/10.3.3/platform/en/siren-federate/connecting-to-remote-datasources/connecting-to-jdbc-datasources.html)

You may reach this limitation: “Only terms aggregations can be nested inside a parent bucket aggregation”

Let me know how it goes
