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

185
Views
No puedo acceder al valor secundario de mi base de datos de firebase

El problema es que los valores de los comentarios de mis películas no están definidos en la tercera foto. Pero en consola funciona correctamente. Quiero acceder a mis comentarios y recuperarlos. ¿Cómo puedo hacer esto? (btnComment es la identificación de mis botones. TextComment es la identificación de la etiqueta de área de texto. Muestra la variable que proporciona la identificación de mi película. La identificación de mi película = 1)

 btnComment.addEventListener('click', (e) => { var movieComment = document.getElementById('textComment').value; push(child(firebaseRef, 'Movies/' + show + '/Comments'), movieComment) { movieComment: movieComment }; }); get(child(firebaseRef, `Movies/` + show + '/Comments')).then((childSnapshot) => { if (childSnapshot.exists()) { console.log(childSnapshot.val()); } else { console.log("error"); } }) var body2 = document.getElementById('detail2'); function AddItemsToTable2(comment) { const comments = ` <td>Alan Smith</td> <td><i class="fa fa-star" style="color:green"></i></td> <td>${comment}<h6>[May 09, 2016]</h6></td> `; html = comments; body2.innerHTML += html; } function AddAllItemsToTable2(TheComments) { body2.innerHTML = ""; TheComments.forEach(element => { AddItemsToTable2(element.movieComment); }); } function getAllDataOnce2() { var show = qs["movieId"]; get(child(firebaseRef, `Movies/` + show + '/Comments/')).then((childSnapshot) => { var comments = []; comments.push(childSnapshot.val()); AddAllItemsToTable2(comments); }); } window.onload = (event) => { getAllDataOnce2(); };

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
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!