Country data looks like -
[{
inEU : true,
x : {...},
y : {...}
}
{
inEU : false,
x : {...},
y : {...}
}]
I need to choose either x or y object based on inEU
field is set to true or false. X and Y object have the same keys (values/data is different).
Find query must use values from X if inEU
is true else use Y object for search purpose.
Kindly let me know if its possible and if yes do provide any URL/links of documentation or any small example will help me.