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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:07:38+00:00 2026-05-14T20:07:38+00:00

I actually have two questions, both are probably simple, but for some odd reason

  • 0

I actually have two questions, both are probably simple, but for some odd reason I cant figure it out… I’ve worked with JSON 100s of times before too! but here is the JSON in question:

{"69256":{
   "streaminfo":{
     "stream_ID":"1025",
     "sourceowner_ID":"2",
     "sourceowner_avatar":"http:\/\/content.nozzlmedia.com\/images\/sourceowner_avatar2.jpg",
     "sourceownertype_ID":"1",
     "stream_name":"Twitter",
     "streamtype":"Social media"
     "appsarray":[]
   },
   "item":{
      "headline":"Charboy",
      "main_image":"http:\/\/content.nozzlmedia.com\/images\/author_avatar173212.jpg",
      "summary":"ate a tomato and avocado for dinner...",
      "nozzl_captured":"2010-05-12 23:02:12",
      "geoarray":[{
         "state":"OR",
         "county":"Multnomah",
         "city":"Portland",
         "neighborhood":"Downtown",
         "zip":"97205",
         "street":"462 SW 11th Ave",
         "latitude":"45.5219",
         "longitude":"-122.682"
       }],
       "full_content":"ate a tomato and avocado for dinner tonight. 
                      such tasty foods. just enjoyable.",
       "body_text":"ate a tomato and avocado for dinner tonight. 
                      such tasty foods. just enjoyable.",
       "author_name":"Charboy",
       "author_avatar":"http:\/\/content.nozzlmedia.com\/images\/author_avatar173212.jpg",
       "fulltext_url":"http:\/\/twitter.com\/charboy\/statuses\/13889868936",
       "leftovers":{
           "twitter_id":"tag:search.twitter.com,2005:13889868936",
           "date":"2010-05-13T02:59:59Z",
           "location":"iPhone: 45.521866,-122.682262"
       },
       "wordarray":{
          "0":"ate",
          "1":"tomato",
          "2":"avocado",
          "3":"dinner",
          "4":"tonight",
          "5":"tasty",
          "6":"foods",
          "7":"just",
          "8":"enjoyable",
          "9":"Charboy",
          "11":"Twitter",
          "13":"state:OR",
          "14":"county:Multnomah, OR",
          "15":"city:Portland, OR",
          "16":"neighborhood:Downtown",
          "17":"zip:97205"
      }
   }
 }
}

Question 1:
How do I loop through each item (69256) when the number is random? e.g. item 1 is 123, item2 is 646? Like, for example, a normal JSON feed would have something like:

{'item':{'blah':'lorem'},'item':{'blah':'ipsum'}}

the JS would be like console.log(item.blah) to return lorem then ipsum in a loop

How do I do it when i dont know the first item of the object?

Question 2:
How do I select items from the geoarray object? I tried:
json.test.item.geoarray.latitude

and

json.test.item.geoarray['latitude']

  • 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-14T20:07:39+00:00Added an answer on May 14, 2026 at 8:07 pm

    Question 1: How do I loop through each item (69256) when the number is random?

    You can get property names of a JS object using the for in statement:

    for (var property in object) {
        if (object.hasOwnProperty(property)) {
            alert(property + '=' + object[property]);
        }
    }
    

    To get the first one of the JSON, you could do:

    var data;
    for (var property in json) {
        if (json.hasOwnProperty(property)) {
            data = json[property];
            break;
        }
    }
    

    Question 2: How do I select items from the geoarray object?

    The geoarray is actually an array with one item. Use [0] to grab it.

    var latitude = data.item.geoarray[0].latitude;
    

    If it in real contains multiple items, then you’ll need to loop over it using a simple for statement with an index or using jQuery.each().


    To learn more about JSON, you may find this tutorial useful.

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

Sidebar

Related Questions

I actually have two questions today, but they are both small :-) 1) Where
I have two testing questions. Both are probably easily answered. The first is that
I have actually two questions but they are kind of related so here they
I actually have two questions regarding exception/error handling in the iPhone app that I
I actually have two questions, the on in the title being the main one.
Actually I have two questions. (1) Is there any reduction in processing power or
I actually have right now two questions: 1) What font faces are preferred for
I have two questions, actaully... First off, Why cant I do this: List<Object> object
Actually, I have two related questions. I'm capturing filtered network traffic by libpcap on
I have two simple questions about regular expressions. Having the string $10/$50 , I

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.