How to access nested property at script_fields on elastic 5.x
<p>I need to iterate over nested objects on painless script_fields for my query but notation doc['nestedProperty.property'] does not gave me the value, neither does using array notation doc['nestedProperty.property'][0]</p>

<p>Any idea on how to use this?</p>

<h1>EDIT</h1>

<p>A document example:</p>

<pre><code>{
    "neestedProperty": [
      {
        "property": 12,
        "innerNeestedProperty": {
          "innerProperty1": 45,
          "innerProperty2": -45
        }
      }
    ]
}
</code></pre>

<p>example query:</p>

<pre><code>{
  "query": {
    match_all: {}
  },
  "script_fields": {
    "scripted": {
      "script": {
        "inline": "doc['neestedProperty.property'] * params.multiplier",
        "params": {
          "multiplier": 100
        },
        "lang": "painless"
      }
    }
  }
}
</code></pre>