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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:18:07+00:00 2026-05-15T09:18:07+00:00

How do I parse this json with jQuery? DayEvents: [{ 0: 886, event_id: 886,

  • 0

How do I parse this json with jQuery?

DayEvents: [{
      "0": "886",
      "event_id": "886",
      "1": "5029",
      "user_id": "5029",
      "2": "Professional",
      "user_type": "Professional",
      ...
  • 1 1 Answer
  • 1 View
  • 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-05-15T09:18:07+00:00Added an answer on May 15, 2026 at 9:18 am

    The term "parsing" is a bit misplaced since this is already in JSON format. You don’t need to parse it, but just to access it. If it were a large String in JSON format then you indeed need to parse it into an useable JSON object first before accessing.

    This JSON contains one property, the DayEvents, which in turn contains an array []. You can access properties using dot . operator. You can get an array item at the given index using [index] where zero 0 denotes the first item.

    var json = { DayEvents : [{"0":"886","event_id":"886","1":"5029","user_id":"5029","2":"Professional","user_type":"Professional" }]};
    var firstDayEvent = json.DayEvents[0];
    

    The array in turn contains an object {}. Or maybe more than one? You can have more than one items in an array, you should then see [{}, {}, {}, ...] and you could then access each item in an loop like so:

    for (var i = 0; i < json.DayEvents.length; i++) {
        var dayEvent = json.DayEvents[i];
        // ...
    }
    

    A single day event object has several properties: 0, event_id, 1, user_id, 2, etc. You cannot access properties starting with a number using dot . operator, you would then like to use the brace notation:

    var zero = firstDayEvent['0'];
    var eventId = firstDayEvent.event_id;
    var one = firstDayEvent['1'];
    var userId = firstDayEvent.user_id;
    var two = firstDayEvent['2'];
    // ...
    
    alert(eventId); // 886
    alert(two); // Professional
    

    To learn more about JSON, check this tutorial.

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

Sidebar

Related Questions

I want to parse this json using jquery and each with a loop. I
I'm trying to get my jQuery to work in this flow: Parse json using
I need to parse this json and get the itemvotecounts, and firstrankvotescounts. [ [
I'm trying to parse this JSOn with multiple entries of node tag: { nodes:
How do you parse this json: a:1:{i:3;a:3:{s:8:routtype;s:9:Alpha SS7;s:6:credit;d:4532.600000000000363797880709171295166015625;s:8:validity;s:3:276;}} to php object or array? Tried
I want to parse this Json code : [{id:7,key:integrationContinue:integrationContinue,name:life Portlet,scope:PRJ,qualifier:TRK,date:2012-03-26T10:10:22+0100,lname:life Portlet,lang:java,version:1.0-SNAPSHOT,description:,msr:[{key:ncloc,val:897.0,frmt_val:897},{key:coverage,val:0.6,frmt_val:0,6%}]}] I created two
I tried but i was unable to parse this json object which comes from
Possible Duplicate: How to parse JSON in JavaScript I have this JSON string: [{title:
Can not parse json using this var res = eval('(' + response + ')');
I have a JSON which I get from web application. I try this parse

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.