Shady Chan Shady Chan - 5 months ago 60
AngularJS Question

Firebase working with list data

"groups": {

"techpioneers": {

"name": "Historical Tech Pioneers",

"members": {
"alovelace": true,
"ghopper": true,
"eclarke": true


This kind of structure is found in firebase docs but I can't figure out how to do the "members" child. How to write the 'wildcard' username as the key and boolean as the value?

Sam Sam

You actually just write the boolean value (or the username object) to the database. The needed child nodes are created, when you add the first child.

For example:

firebase.database().ref('groups/techpioneers/members' + username).set(true);


firebase.database().ref('groups/techpioneers/members').set({username: true});