Reputation: 957
I have a firebase database and want to get the values from the DB into swift but I need to filter the data as I have 2 types of data Inc
and Exp
how can I create a query for Firebase that will select all the fields where Type = Exp
for example
Here is how my DB looks like
Upvotes: 0
Views: 225
Reputation: 478
if you get your response from firebase as an Array, you can do
response = response.filter({yourItem.type == "Exp"})
Upvotes: 1