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

161
Views
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 answers
Answer question

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 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!