# Same order of aggregation

**URL:** <https://discuss.elastic.co/t/same-order-of-aggregation/58078>\
**Category:** Elasticsearch\
**Created:** [August 16, 2016, 1:02am UTC](https://discuss.elastic.co/t/same-order-of-aggregation/58078 "2016-08-16T01:02:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tatireddy\_Reddy](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tatireddy\_Reddy](https://discuss.elastic.co/u/Tatireddy_Reddy)\
**Post date:** [August 16, 2016, 1:02am UTC](https://discuss.elastic.co/t/same-order-of-aggregation/58078/1 "2016-08-16T01:02:29Z")

</div>

Hi All,.

I have multiple aggregation. I want to get the results in same order in which I added aggregation.

Ex

Agg1

Agg2

Agg3

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [August 16, 2016, 12:14pm UTC](https://discuss.elastic.co/t/same-order-of-aggregation/58078/2 "2016-08-16T12:14:50Z")

</div>

That's why aggregations have keys. Note that in JSON an object is an unordered set of name/value pairs.

---

<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 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/same-order-of-aggregation/58078/3 "2017-07-05T22:27:34Z")

</div>


