Say that the document is given.
Is there a way in fql to get the “blocks” based on their “refs” value? E.g. only return “block_1” based on “refs” = XYZ.
I.e. the above example should only return “block_1”.
I hope the question is clear. Feel free to ask for clarification.
The key thing that @3rChuss showed is that when you index on a field that is in an array, every element of the array is added as an entry into the index.
Also, in general, the Let function can go a long way to help organize a complex or multi-step query. That would be how you could create a list of different “steps” of computed values.
Depending on the actual data you have, the extra filter step might not be necessary. The Document you shared: it’s not actually a valid javascript/json object. If you are still looking for help getting this working, can you confirm what an example document looks like?