i have this data
[
{
“id”: “mapping:1686:2004:test”,
“bucket”: {
“mappings”: [
{
“destinations”: [
{
“dest_question”: “7480”
}
],
“src_format”: “123asd”,
“src_question”: “asD”,
“src_type”: “DATE”
},
{
“destinations”: [
{
“dest_answers”: [
“13”
],
“dest_question”: “4930”,
“src_answer”: “asd/asdasd”
}
],
“src_format”: “”,
“src_question”: “asd/asd”,
“src_type”: “ENUM_SINGLE”
}
],
}
}
]
i want to check if src_answer string already exists for specific src_question.
I am trying to do it something like this for example :
SELECT count(*) AS cnt FROM trials USE KEYS [‘mapping:1686:2004:test’] WHERE
ANY m IN IFMISSINGORNULL(mappings, ) SATISFIES LOWER(m.src_question) = ‘asd/asd’ AND
ANY dest IN IFMISSINGORNULL(m.destinations, ) SATISFIES LOWER(dest.src_answer) = ‘asd/asdas/j’ END
but i get an error [3000] syntax error - at end of input.
Can someone please help me and enlighten me what am i doing wrong?