I have a painless script that I use in my watcher and I need to access a nested element but for some reason I am getting a compile error.
I access the element in this way:
hits.hits[0]._source.getSomething.the-problematic-key-with-.errors.error-1
Everthing look fine until getSomething
but if try to reach the-problematic-key-with-
then I get a compile error in my watcher. I also tryied with Debug.explain() but it gives me the same result.
Here how the structure looks like.
"hits" : {
"hits" : [
{
"_source" : {
"getSomething" : {
"the-problematic-key-with-" : {
"errors" : {
"error-1" : {
"level" : "WARNING",
"message" : "The message",
},
"error-2" : {...},
}
}
}
}
}
},