I'm doing a user search in the code below. The return value is user info and user setting. I just want to get only user info. Is this possible?
database model :
- users
- userid
info
-name
-online
setting
- openid
- userid
my code:
let ref = Database.database().reference().child("users").queryOrdered(byChild:"info/name").queryStarting(atValue: text , childKey:"name").queryEnding(atValue: text + "\u{f8ff}" , childKey: "name").queryLimited(toFirst: sonucSayısı)
ref.observeSingleEvent(of: .value, with: { (snapshot) in
if value == text{
print(snapshot)
}
}) { (err) in
print(err)
}