I am trying to query an event by the user's unique id, but it won't return anything. Here's my code for the query:
Query events = mDatabaseEvents.orderByValue().equalTo("user1");
and here's my Firebase Database structure:
events: {
-event1: {
1: user1,
2: user2,
3: user3,
},
-event2: {
1: user4,
2: user5,
3: user1,
},
I believe it is not working because the data is set through a hashmap, so "user1" may not be always in the same spot in each event. How do I go about fixing this problem? Thanks