Kibana4 scripted field array access

Hello,

i have the following field:
"load_average": [ 2.57, 2.2, 2.18 ],
this is the JSON.

I now want to use scripted fields to generate separate fields so I can visualize the loads separately.

What I tried so far is:
doc["os.load_average"].value[1]

This does give me the first value.
But so does:
doc["os.load_average"].value[2]

Is there any other way to get a specific value in an array?

Kind Regards,
Luca

By default Kibana 4 scripted fields use Lucene expressions, which currently only operate on numeric fields.

You can turn on static Groovy scripts, which have more advanced scripting functionality (note dynamic Groovy scripts are no longer recommended) -- for more discussion on how to do that in Kibana 4 please see this thread.