The following code works as expected. But I have 2 questions:
// Save default Account Types
var refTypes = this.housesRef.child(key + "/memberaccounttypes/");
refTypes.push({ name: 'Checking', icon: '0' });
refTypes.push({ name: 'Savings', icon: '0' });
refTypes.push({ name: 'Credit Card', icon: '0' });
refTypes.push({ name: 'Debit Card', icon: '0' });
refTypes.push({ name: 'Investment', icon: '0' });
refTypes.push({ name: 'Brokerage', icon: '0' });
- With this approach, am I doing several trips to Firebase, one for each push?
- Is there a more efficient, best-practice, way to save the following data all at once?
I'm using Firebase SDK 3