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 8387115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:07:33+00:00 2026-06-09T18:07:33+00:00

I am using t.js as a template engine in my project. How to make

  • 0

I am using t.js as a template engine in my project. How to make template for this json:

{
data: [
    {
        FirstName: "Test1",
        LastName: "Test11"

    },
    {
        FirstName: "Test2",
        LastName: "Test22"
    },
    {
        FirstName: "Test3",
        LastName: "Test33"
    }
]

}

I want to render it like

<ul>
    <li>Test1,Test11</li>
    <li>Test2,Test22</li>
    <li>Test3,Test33</li>
</ul>

Can you suggest any other template engine along with template html for my above case which is better? I don’t want to use any template engine using eval or new Func

  • 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-09T18:07:34+00:00Added an answer on June 9, 2026 at 6:07 pm

    Markup

    <ul id="myList">
        {{@mydata}} <li>{{=_val.FirstName}},{{=_val.LastName}}</li> {{/@mydata}}
    </ul>
    

    Javascript

    var source = $("#myList").html();
    var template = new t(source);
    $("#myList").html(template.render({
        mydata: [
            {
            FirstName: "Test1",
            LastName: "Test11"
    
            },
            {
                FirstName: "Test2",
                LastName: "Test22"},
            {
                FirstName: "Test3",
                LastName: "Test33"
            }
        ]
    }));
    

    demo : http://jsfiddle.net/diode/c2Qhw/

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

Sidebar

Related Questions

I am using google app engine in python with a Jinja2 template engine. This
Currently I'm working on a Project with Handlebars (JS Template Engine) and I'm using
At the moment i'm using EJS template Engine but I need to convert it
How can we separate Logic from presentation without using any template engine (traditional php-not
I am using velocity engine template for mailing in struts1 and hibernate configuration. I
Since Intellij does not yet support the Play-Scala-Template-Engine I was thinking about using plain
I am using appengine webapp2 as wsgihandler, jinja2 as the template engine and wtforms
I keep getting this error when using django templates in Google App Engine: TemplateSyntaxError:
For some years that I've been using my own PHP template engine, which is
I'm trying to render an html table using underscore template engine. First I have

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.