I successfully uploaded data to firebase by using the code snippet below:
var firebaseObj = new Firebase("https://burning-fire-1723.firebaseio.com/Articles");
var fb = $firebase(firebaseObj);
fb.$push({
title: "title",
post: "post",
emailId: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81ecf8ece0e8edc1e6ece0e8edafe2eeec">[email protected]</a>"
}).then(function(ref) {
console.log(ref);
}, function(error) {
console.log("Error:", error);
});
Now, in order to retrieve a specific record from Firebase, I need to set a priority for the emailId field when pushing the data. However, I'm struggling to figure out how to accomplish that task. Any assistance on this matter would be greatly appreciated.