I'm using nested fields and a field name in the nested field name, as you can see below (example) :
[doc][vegetables][%{[tmp_data][vegetable_name]}][number]
The field above is getting created, but now, I want in another filter (i'm updating existing documents) to check if the field exists. I tried to do things like :
-
if ([doc][vegetables][%{[tmp_data][vegetable_name]}][number]) {
-
if "[doc][vegetables][%{[tmp_data][vegetable_name]}][number]" {
-
if [doc][vegetables]["%{[tmp_data][vegetable_name]}"][number] {
What's the correct syntax ?
Thanks in advance.