Search code examples
google-cloud-firestorefirebase-security

How Can I Create a rule in firestore security rules for each item in my array


I can access a single item with its index like this

In this example i can access a single item in that array but i want the rule to be not for that single item but for each item in that array.


Solution

  • After looking for a solution for some time couldn't find anything and instead of storing the Posts in an array i just created a collection inside the Person document and stored them in there.