{
"foo": [
{
"bar": "one"
},
{
"bar": "two"
}
],
"num": 1
}
{
"foo": {
"bar": [
"two",
"three"
]
},
"num": 2
}
{
"1": {
"hits": {
"total": 2,
"max_score": null,
"hits": [
{
"_index": "array",
"_type": "Array",
"_id": "AVjAY62CECh9prBPbven",
"_score": null,
"_source": {
"foo": {
"bar": [
"two",
"three"
]
}
},
"fields": {
"foo.bar.keyword": [
"three",
"two"
]
},
"sort": [
"Array"
]
}
]
}
},
"doc_count": 2
}
And the call to "agg.vis.indexPattern.flattenHit(hits[0])[agg.params.field.name]" returns me: ["three", "two"]
{
"1": {
"hits": {
"total": 2,
"max_score": null,
"hits": [
{
"_index": "array",
"_type": "Array",
"_id": "AVjAY62CECh9prBPbven",
"_score": null,
"_source": {
"foo": {
"bar": [
"two",
"three"
]
}
},
"sort": [
"Array"
]
}
]
}
},
"doc_count": 2
}
And the call to "agg.vis.indexPattern.flattenHit(hits[0])[agg.params.field.name]" returns me: ["three", "two"]