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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:53:47+00:00 2026-06-14T08:53:47+00:00

Currently I am using the following code to display parts of a JSON data

  • 0

Currently I am using the following code to display parts of a JSON data file:

$.getJSON( 
    "json.json",
    function(data) {
        $.each(data.events, function() {
            $('#listings').append("<p>" + this['eventname'] + "</p><p>" + this['eventurl'] + "</p><p>" + this['dates[startdate]'] + "</p>");
        });
    }
);

This is part of a locally cached and created JSON file which I’m retrieving the data from.

"events": [
    {
        "eventid": "4419605",
        "facebookeventid": "",
        "eventname": "Mervi"
        "dates": {
            "startdate": "20120529010000",
            "enddate": "20121231235500",
            "timezone": "EDT"
        },
        "venue": {
            "venueid": "210795",
            "name": "On
            "venueimages": {
                "large": "",
                "small": ""
            }
        },
        "eventimages": [""],
        "prices": {
            "pricelow": "$195.00",
            "pricehigh": "$195.00",
            "pricedisplay": "$195.00"
        },
        "attractionList": [
            {
                "sequence": "0",
                "artist": "",
                "artistid": "7014411",
                "billing": "1.00",
                "genre": "Seminar/Lecture",
                "links": "",
                "media": ""
            },
            {
                "sequence": "1",
                "artist": "Families.",
                "artistid": "7014441",
                "billing": "0.75",
                "links": "",
                "media": ""
            },
            {
                "sequence": "2",
                "artist": "Se",
                "artistid": "7014451",
                "billing": "0.75",
                "links": "",
                "media": ""
            }
        ]
    },

I can access the eventname and the following key entries to produce the values in html (which is what I’m after) but when I want to display the venueid value, this is inside venue which inside the array. And eventimages which has an empty array, which too is inside the main array. What would be the right syntax to display the data here? Am i using the right JSON/AJAX menthod to display complicated JSON structures like this one? Thanks.

  • 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-14T08:53:49+00:00Added an answer on June 14, 2026 at 8:53 am

    Given that you fix a few things that are broken in your current JSON object, you can access these properties by this.venue.venueid (just as you can use this.eventname rather than this['eventname']).

    If you for some reason prefer the stringed notation, the equivalent would be this['venue']['venueid'] but I see no useful case for it here.

    The problems in your JSON object are

    • Missing comma after event name
    • Unterminated string and missing comma after venue name
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using the following code to update form data before submission. $('.countyx').change(function(){
I'm currently using the following code to append a X link to each element
Currently I'm using the following code to append certain elements to the DOM: $('<p/>',
I'm currently using the following code (C#): private static void PlayLoop(string filename) { Audio
Hey I am currently using the following code Dim flickr As New Flickr(apikey) Dim
I'm currently using StructureMap to inject instances of NHibernate ISessions using the following code:
I'm currently using the following PHP code: // Get all subordinates $subords = array();
I am using currently the following code to populate a combobox: combobox.DataSource = datatable;
In short, currently I am using the following code to pull records from multiple
I'm currently facing new problem with operators. Using following code, I want to make

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.