Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8880201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:07:21+00:00 2026-06-14T20:07:21+00:00

I want to render the following using express and jade: function(output) { for (i=0;i<output.entities.length;i++){

  • 0

I want to render the following using express and jade:

function(output) {
   for (i=0;i<output.entities.length;i++){
      console.log(output.entities[i].uuid);
   }
res.render('errCodes.jade', {title : 'Error Codes', entry: output.entities});
},

the jade looks like so:

items = entry
    each item, i in items
    li <a href="/#{i}">#{item}</a>

The console log looks nice, but no matter what I try, I can’t get the jade page to look nice. At the moment, there are two links that read

[object Object]
[object Object]

which is expected. However, I want two links of the ID to show up, but every time I’ve tried I either get each character of the ID as its own link, or the aforementioned object, object. Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:07:22+00:00Added an answer on June 14, 2026 at 8:07 pm

    is your original indentation correct? or is it just here on SO that it looks wrong?

    items = entry
      each item, i in items
      li <a href="/#{i}">#{item}</a> // this should be further right
    

    You can use pure jade to achieve the same:

    items = entry
      each item, i in items
        li
          a(href="/#{i}") #{item}
    

    if your array looks like the following

    output.entities = [{ uuid: 1234 }, { uuid: 5678 }];
    

    your jade should look like this

    items = entry
      each item, index in items // iterate over array
        li
          a(href="/#{index}") #{item.uuid}
    

    index will be 1,2,3,4,… etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following problem: I want to render a news stream of short messages based on
I want to render the partial view using ajax. When I submit the button,
I want to render an object from my controller to a jQuery callback function.
I have created a chart using JFreeChart inside a JSP. I want to render
i am fetching data using following code _.each(cardIds, function(id){ var mdc = new MdlCard({cardId:
I want to render using Richfaces a context menu on left click on a
I want to achieve following layout using javascript/jquery and css. I have a project
I want to perform the following task using JSF / Richfaces On click of
I have the following problem with QT model/view framework. I want to render a
I am using Adventureworks2008R2 Database and trying to render the following. I have problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.