Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
Firebase returned value not rendering in ejs

In my ejs i have this code:

 <% for(var bill in ChildData){ %>
    <tr>
       <td><%= bill.id %></td>
       <td><%= bill.Phone %></td>
       <td><%= bill.Amount %></td> 
       <td><%= bill.Purchase_Date %></td>
       <td>View Details</td>
    </tr>
 <% } %>

In my node I have

app.get("/viewbill", function(req,res){
    database.once("value", function (snapshot) {
        res.render('viewbills', {ChildData: snapshot.val()});    
    });
})

However on the page I obtain Screenshot of the output I get

Even if I try I get the same result

<td><%- JSON.stringify(bill.id) %></td>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Changing ejs code to this gave me the output

<% Object.keys(ChildData).forEach(function(key) { %>
                <tr>
                    <td><%- ChildData[key].id %></td>
                    <td><%- ChildData[key].Phone %></td>
                    <td><%- ChildData[key].Amount %></td> 
                    <td><%- ChildData[key].Purchase_Date %></td>
                    <td>View Details</td>
                </tr>
              <% }); %>   
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda