How can I properly assign the name value inside the parent to a const
?
exports.myFunction = functions.database.ref('/messages/{pushId}/likes')
.onWrite(event => {
const name = event.parent.data.val().name; // This approach doesn't work. What is the correct way to retrieve the name located in /messages/{pushId}?
});