I have a document with a map in it like so:
keys: {
value1: true
value2: true
value3: true
}
I want to allow a user to read that document if any values in a separate document's array match any one of the map keys. The external document is setup like this:
values: [
0: value1,
1: value5,
2: value6,
]
Since the external document array contains "value1" and it matches the key "value1" in the "keys" map, it should allow the read.
I know I can retrieve the external document array using get(/databases/$(database)/documents/myCollection/myDoc).data.values;
But I do not know how to make the comparison properly.