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

  • SEARCH
  • Home
  • 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 8182441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:51:48+00:00 2026-06-07T00:51:48+00:00

for example: I have created one javascript property array model with some properties like

  • 0

for example:

I have created one javascript property array model with some properties like Name, start, director, year as per below:

model = {}
  model.Name = [];
  model.Stars = [];
  model.Director = [];
  model.Year = [];

then i added some data in model using push method for example at runtime

Name="DDLJ"
Stars="SRK"
Director="Yashraj"
Year="1998"

Name="K3G"
Stars="SRK"
Director="Karan"
Year="2004"


Name="KKHH"
Stars="SRK"
Director="Karan"
Year="2000"

So i want to show this all info of model array object to html table using jquery template,
but I don’t know how do it?

i tred by using {{each}} {{/each}} but it only shows one property data at a time then next
like….

{{each Name}} ${{$Value}} {{/each}}

{{each stars}} ${{$Value}} {{/each}}

Please solve this issue and help me…

  • 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-07T00:51:51+00:00Added an answer on June 7, 2026 at 12:51 am

    The model should be like this (an array of objects, not an object with multiple arrays):

    var model = [];
    model.push( { Name: "DDLJ", Stars: "SRK", Director: "Yashraj", Year: 1998 } );
    // etc
    

    Then you should be able to write something like this for the template:

    <script id="modelTemplate" type="text/x-jquery-tmpl"> 
            <tr> 
                <td>${$Name}</td>
                <td>${$Stars}</td>
                <td>${$Director}</td>
                <td>${$Year}</td>
            </tr> 
    </script>
    
    <table id="modelTable"><table>
    

    And then to render the template:

    $("#modelTemplate").tmpl(model).appendTo($("#modelTable");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example I have created cluster with 1GB RAM memory per node. After some
I have an array of objects that I've created using Javascript. The objects are
With javascript, you can have one object inherit properties from another, so that if
I have a webpage thats created by javascript injections and one of my pages
I have some Javascript code that needs to be dynamically created as a String
wel if you have a mastertable any columns example mastertable columns createdon,modifiedon,name,id detailtable has
I have created a little example,please have a look, http://jsfiddle.net/bWTwL/ I want to have
I have created a Space Invaders Game using an example game + source. Using
I have created a basic site using ASP.NET routing according to Mike Ormond's example
I have created a separate class (let's call it class2.cs for example) and want

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.