Return aggs as array rather than object

Wanting to display term aggregations using d3js, hover the aggregations are
dynamic.

It appears that aggs are returned in an object rather than an array...
for instance if I have to term aggs; agg1 and agg2

the result is {"aggregations":{"term1":data,"term2":data}

that really kills me, as it seems, and would obviously be convenient for me
to return the aggs in an array. I guess normally you can request the aggs
by name but I will not be able to know that ahead of time as it will be
dynamic.

too tired but perhaps there is a way to convert the json to an array or
have elasticsearch return the aggs as an array?

Thanks,
Bobby

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f4900519-1891-4106-a669-38f43743a76c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Bobby,

There is no such functionality in elasticsearch so this would have to be
done on client side.

On Wed, Apr 15, 2015 at 7:58 AM, Bobby Richards bobby.richards@gmail.com
wrote:

Wanting to display term aggregations using d3js, hover the aggregations
are dynamic.

It appears that aggs are returned in an object rather than an array...
for instance if I have to term aggs; agg1 and agg2

the result is {"aggregations":{"term1":data,"term2":data}

that really kills me, as it seems, and would obviously be convenient for
me to return the aggs in an array. I guess normally you can request the
aggs by name but I will not be able to know that ahead of time as it will
be dynamic.

too tired but perhaps there is a way to convert the json to an array or
have elasticsearch return the aggs as an array?

Thanks,
Bobby

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f4900519-1891-4106-a669-38f43743a76c%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f4900519-1891-4106-a669-38f43743a76c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhCtN_8U25Ogwp6GT7Vv7QQ-hEzCsTOOSHRP781J1kVnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.