firebase - Return a $firebaseArray of objects that contain a sub-value -
i want return $firebasearray of records contain particular value without knowing parent id.
so in case, want objects under 'challenges' contain id pictured above starting lnf.
i have tried using orderbychild , equalto, again seems requiring knowing parent id. there way around this?
if want key cpjip3tve1q067qzx6p0vij0k1|1
try this:
var key = "cpjip3tve1q067qzx6p0vij0k1|1"; child in snapshot.children { if child.key == key { data } }
you can use loop on of children under "challenges"
Comments
Post a Comment