Following is the structure of my Firestore
database.
Collection 'users' contain user information where the document name is same as the user ID. Every user will have Zip Codes. In the below screenshot user ID ending with 'O03' has three Zip Codes (123456, 369852, 478965)
Collection 'orders'. Whenever a customer places an order, it will contain the user's ID and ZIP Code.
There may be many orders which have the same ZIP Codes. What I want to do is, get the orders which contain ZIP Code that belong to the user, ZIP Code in the orders should match any three (in the given example) of the ZIP Code that the user has. Users can have many ZIP Codes and each user will have a different number of ZIP Codes.
Could someone help me with this?