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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:39:36+00:00 2026-06-17T11:39:36+00:00

I am trying to parse the json object using jquery but it is giving

  • 0

I am trying to parse the json object using jquery but it is giving me error that cannot get the length of a null object. I am not able to find the reason. Please help me in finding the issue. Here is what i am doing

            var slider_images = {
                "image": [
                            {"fname":"1", "caption":"this is 1"},
                            {"fname":"2", "caption":"this is 2"},
                            {"fname":"3", "caption":"this is 3"},
                            {"fname":"4", "caption":"this is 4"},
                            {"fname":"5", "caption":"this is 5"},
                            {"fname":"6", "caption":"this is 6"},
                            {"fname":"7", "caption":"this is 7"},
                            {"fname":"8", "caption":"this is 8"}
                        ]
            };

            var imageObj = $.parseJSON(slider_images.image);
            $.each(imageObj,function() {
                //alert("fname is::"+this['fname']);
                alert("1");
            });

I want to get the fname and caption for all the subobjects that fall under image. Please let me know where I am going wrong…

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-17T11:39:37+00:00Added an answer on June 17, 2026 at 11:39 am

    Parsing JSON means converting a string into a JavaScript object. You already have an object so have nothing to ‘parse’.

    You can just use your object like this:

     $.each(slider_images.image, function() {
            console.log(this);
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get my jQuery to work in this flow: Parse json using
I'm trying to parse some JSON coming from an AJAX request using jQuery. Basically,
I am trying to parse a json object using gson in Android application ,the
I'm trying to parse JSON string using Boost Spirit store JSON object into recursive
I am trying to parse a json file using jquery getJson. I have no
I'm trying to save changes to a JSON file using JQuery and PHP, but
I am trying to get send json from my javascript (using jquery post) to
I was trying to parse a JSON string from USGS . However I get
I have been trying to access/parse the message object found in the JSON results
I am trying to convert some xml into a json object using PHP. This

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.