Is there a way to create a new node called terriangen
, add a key, and set the object data in Firebase?
-usernames
-{UID}
-mylibrary
-{key}
-terriangen
-{key}
type:mountain
name:1.png
This is the code I currently have:
const newObjRef = firebase.database()
.ref('usernames')
.child(userId)
.child('mylibrary/')
.push();
newObjRef.set({
type: terrainType,
name: terrainName
});