I'm trying to store a nested key/value object in a variable, but it doesn't seem to be storing anything.
In a for loop, where "i" is the index:
def ratio = params['_source']['ratios'][i]
...def will be null.
Is it not possible to assign nested values/objects to variables?
Mapping of "ratios":
"ratios": {
"type": "nested",
"properties": {
"Key": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Value": {
"type": "float"
}
}
}