firebase - Return a $firebaseArray of objects that contain a sub-value -


i want return $firebasearray of records contain particular value without knowing parent id.

firebase db

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|1try this:

var key = "cpjip3tve1q067qzx6p0vij0k1|1";  child in snapshot.children {     if child.key == key {         data     } } 

you can use loop on of children under "challenges"


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -