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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:37:10+00:00 2026-06-10T03:37:10+00:00

I have a json structure is like this.. { event: [ { ids: [

  • 0

I have a json structure is like this..

{
"event": [
    {
        "ids": [
            "100",
            "101"
        ],
        "eventlist": [
            {
                "title": "Title1",
                "day": "Fri",
                "date": "2",
                "endDate": "6",
                "month": "1"
            },
            {
                "title": "Title2",
                "day": "Mon",
                "date": "5",
                "endDate": "5",
                "month": "1"
            }
        ]
    }
]
}

HTML Handlebar template..

{{#event}}
  {{#each eventlist}} 
   <li>
      <div>{{title}}</div>
      <div>{{day}}</div>
      <div>{{month}}</div>
   </li>
   {{/each}}
{{/event}}

How can i store the values title,day,month as a jquery.data() value into the li , so that i can access the data of li using li.data()

  • 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-10T03:37:12+00:00Added an answer on June 10, 2026 at 3:37 am

    Just add them as data attributes:

    <li data-title="{{title}}" data-day="{{day}}" data-month="{{month}}">
    

    jQuery will be able to access them through .data():

    var title = $('li').data('title');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSON structure like this: { id:100 contactInfo: { name: John Doe
I have a json structure that I'm decoding that looks like this: person =>
I have a directory structure like this: root folder1 abc.json def.json somedir more.json folder2
I have a controller returning a json structure like so: def show # .......
I have a JSON-like data structure (which I don't want to change) that is
I have a WS Witch return to me a JSON structure. I would like
I have folder structure and I would like to create JSON objects based on
I have some data and need to create a json file with this structure
I have JSON like this: { something: http://something.com } and HTML like this: <a
I have somewhat deep Json structure like below incoming over the wire into C#

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.