var num = counter;
var foo= {};
foo["id" + num]= 3;
ref2.child("id" + num).update({: 3});
This is just a snippet of my code, and i'm using firebase legacy (i know i need to switch, but haven't yet). So I'm trying to either set (or update, whichever is the best way) a current child which is id1, id2, id3
etc. I'm trying to access a specific id value (which I've done using previous code and is stored in counter
) and set that id
value to something. However, i can't do so without using a specific key. Please help!!
Thanks