I'm trying to retrieve all car data where name is golf but i get no results:
This is my query:
ref.child("auto").queryOrdered(byChild: "name").queryEqual(toValue: "golf").observeSingleEvent(of: .value, with: { (snapshot) in my Firebase structure is:
-auto --luhrvuuigvuilthuv ---tgrebytfbyuhbyujvyjb ----name:golf ----age: 2 ----color: blue ---funjityvniyyuhntyity ----name:golf ----age: 2 ----color: blue Where is the problem? Thnx in advance
luhrvuuigvuilthuvdoesn't have a propertyname, so the query doesn't match anything. It looks like you're trying to implement categories, for which I described a good data model here: stackoverflow.com/questions/40656589/…nameinto a list ofnames. See my answer to the question I linked in the first comment.