Firstly, I am sorry for my terrible english.
I am trying to learn and make a Firestore app. In my app, I get the colors of users. If other users chosen the same color, it matches the users. It is very simple app but I cant write the query and get userId.
My database example:
cRef = fStore.collection("Users");
cRef.whereArrayContains("colors", "red").get();
I have read many articles but could not understand, how can I list the UserId's with this 'whereArrayContains()' method? Thank you for your helpings.
You should indeed use the
array-contains
operator to filter based on array values.In your case you would do something along these lines:
More details in the doc here and here.