No results when using AND ANY … SATISFIES on N1QL query

I have this document in my DB

{
“createdAt”: 1571998539330,
“data”: {
“hostelInteractionIdentifierItem”: {
“hostelIdentifier”: {
“id”: “87988755456”
}
},
“identifier”: [
{
“id”: “75”
}
],
“_class”: “com.bendiciones.BuenasNoches”,
“status”: {
“code”: {
“value”: “OPEN”
}
}
},
“_class”: “com.bendiciones.BuenasNoches”,
“id”: “75”,
“type”: “BNF”,
“version”: 1
}

that I query using
SELECT * FROM bendiciones where ANY hostelIdentifier IN data.hostelInteractionIdentifierItem SATISFIES hostelItIdentifier.id = “87988755456” END;

but I get no results

ANY clause can be used only with ARRAY (i.e data.hostelInteractionIdentifierItem is not ARRAY)

SELECT b.* 
FROM  `bendiciones`  AS b 
WHERE  b.data.hostelInteractionIdentifierItem.hostelItIdentifier.id = "87988755456";

In above document identifier is ARRAY, which needs ANY clause like below

SELECT b.* 
FROM  `bendiciones`  AS b 
WHERE  ANY v IN b.data.`identifier` SATISFIES v.id = "75" END;
1 Like