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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:43:40+00:00 2026-05-25T15:43:40+00:00

I have a string that is json like this: { 2045532196113651: [{ height: 42,

  • 0

I have a string that is json like this:

{
"2045532196113651": [{
    "height": 42,
    "width": 75,
    "source": "https://url1"
}, {
    "height": 42,
    "width": 75,
    "source": "https://url2"
}],
"2045532296113641": [{
    "height": 50,
    "width": 75,
    "source": "https://url3"
}, {
    "height": 50,
    "width": 75,
    "source": "https://url4"
}]

}

The string has the variable name jsondata.

I want to get the numbers of the indexes in the json object (2045532196113651 and 2045532296113641) in this example. Also I want to get the 4 urls (url1, url2, url3, and url4).

How do I do that? I can use jquery.

  • 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-05-25T15:43:41+00:00Added an answer on May 25, 2026 at 3:43 pm

    First you parse the string so that you get an object, then you can loop it:

     var obj = $.parseJSON(jsondata);
     $.each(obj, function(key, value) {
       // key is the name of the item, e.g. "2045532196113651"
       // value is an array:
       $.each(value, function(idx, item) {
         // item.source contains the URL
       });
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a JSON string that looks like this (Usingt Rails and a
I have a JSON string that looks something like this: {addresses:{address:[{@array:true,@id:888888,@uri:xyz,household:{@id:44444,@uri:xyz},person:{@id:,@uri:},addressType:{@id:1,@uri:xyz,name:Primary},address1:xyz,address2:null,address3:null,city:xyz,postalCode:111111}]}} What would be
Ok..so i have a json string (myJson) that looks like this: {id: 1, file:
I have a JSON string (from PHP's json_encode() that looks like this: [{id: 1,
I have an PHP array parsed from a JSON string that looks like this:
I have a string that looks like this: Name1=Value1;Name2=Value2;Name3=Value3 Is there a built-in class/function
If I have a string where there is a valid JSON substring like this
I have a JSON String like this $test='{var1:null,var3:null,status:{code:150,message:blah blah}}'; I want to access the
I have a JSON string that I would like to convert to a javascript
I have a JSON response that looks like this. I want to extract the

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.