I'm trying to figure out how to update a property within the snap.val() in order to make changes to my Firebase database.
function updateListItem(listItem) {
var dbRef = firebase.database()
.ref()
.child('userdb')
.child($scope.user.uid)
.child(listItem.taskid);
dbRef.on('value', snap => {
var task = snap.val()
console.log(task);
//Need help updating object property here
});
}
This is all new to me, so any advice on working with Firebase would be greatly appreciated! Thank you in advance.