Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
I am trying to retrieve data from a single key in firebase

I am trying to retrieve data from a single key in firebase.

var ratingRef = firebase.database().ref("hollywood/");
ratingRef.orderByValue().on("value", function(data) {
    data.forEach(function(data) {
        var name = ("The " + data.val().name + " rating is " + data.val().director + data.val().year);
        var pic = data.val().src;
        alert(pic)
        var fame = $("#tame").attr("src", pic + "<div>")
        $("#test").append(name + " <br>");
    });
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try it out this way:

var ratingRef = firebase.database().ref("hollywood/").orderBy("value");
function checkrating(ratingRef){
  ratingRef.forEach(data => {
    var name = ("The " + data.val().name + " rating is " + data.val().director + data.val().year);
        var pic = data.val().src;
        alert(pic)
        var fame = $("#tame").attr("src", pic + "<div>")
        $("#test").append(name + " <br>");
  });
}
checkrating(ratingRef)

if this doesn't help, try explaining the problem further or telling us the error in your console

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!