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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:52:08+00:00 2026-06-03T16:52:08+00:00

This is what the JSON outputs { created_at: Wed, 09 May 2012 22:13:32 +0000,

  • 0

This is what the JSON outputs

{
  "created_at": "Wed, 09 May 2012 22:13:32 +0000",
  "from_user": "EastCClothing",
  "from_user_id": 119699125,
  "from_user_id_str": "119699125",
  "from_user_name": "Tester23",
  "geo": {
    "coordinates": [
      54.9742,
      -1.5974
    ],
    "type": "Point"
  },
  "id": 200347799861198850,
  "id_str": "200347799861198849",
  "iso_language_code": "pt",
  "metadata": {
    "result_type": "recent"
  },
  "profile_image_url": "http://a0.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
  "profile_image_url_https": "https://si0.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
  "source": "<a href="http://twitter.com/download/android" rel="nofollow">Twitter for Android</a>",
  "text": "#CM0655 GEO",
  "to_user": null,
  "to_user_id": 0,
  "to_user_id_str": "0",
  "to_user_name": null
}, 

What I am trying to do is get a hold of the coordinates so that I may use them with google maps api, I am able to access all the other details fine but can’t access the coordinates through what I expected ‘json.results[i].geo.coordinates’. Here’s my JQuery

$(function(){
    function searchTweets() {
        var url='http://search.twitter.com/search.json?callback=?&q=cm0655';
        $.getJSON(url,function(json){


            var output = [];


            for (var i = 0, len = json.results.length; i < len; i++) {


               output.push('<p id="tweet"><img id="tweetImage" src="' + json.results[i].profile_image_url + '" width="48" height="48" /><span id="tweetText">' + '<a href="http://twitter.com/' + json.results[i].from_user + '">' + json.results[i].from_user + "</a> " + json.results[i].text + "<br />" + json.results[i].created_at + '</p>' + json.results[i].geo.coordinates + '</span>');
            }

            $("div.twitter2").html(output.join('')).slideDown('slow');
        });
    }


    var timer = setInterval(searchTweets, 20000);


    searchTweets();

});

Many 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-03T16:52:13+00:00Added an answer on June 3, 2026 at 4:52 pm

    Sorry for the previous fail i’ve found a solution what you need to do is check if the results.geo is an object then loop if not exclude it or set it to something else i’ve done this

    Disclaimer This is very much so not the best solution but it is a working one to give you an idea of how to solve the issue. Hope it helps!

    $(function() {
        function searchTweets() {
            var url = 'http://search.twitter.com/search.json?callback=?&q=from:Eastcclothing';
            $.getJSON(url, function(json) {
    
                console.log(json);
                var output = [];
    
    
                for (var i = 0, len = json.results.length; i < len; i++) {
    
                    if ($.isPlainObject(json.results[i].geo)) {
                        output.push('<p id="tweet"><img id="tweetImage" src="' + json.results[i].profile_image_url + '" width="48" height="48" /><span id="tweetText">' + '<a href="http://twitter.com/' + json.results[i].from_user + '">' + json.results[i].from_user + "</a> " + json.results[i].text + "<br />" + json.results[i].created_at + '</p>' + json.results[i].geo.coordinates + '</span>');
                    } else {
                        output.push('<p id="tweet"><img id="tweetImage" src="' + json.results[i].profile_image_url + '" width="48" height="48" /><span id="tweetText">' + '<a href="http://twitter.com/' + json.results[i].from_user + '">' + json.results[i].from_user + "</a> " + json.results[i].text + "<br />" + json.results[i].created_at + '</p>' + json.results[i].geo + '</span>');
                    }
                }
    
                $("div.twitter2").html(output.join('')).slideDown('slow');
            });
        }
    
    
        var timer = setInterval(searchTweets, 20000);
    
    
        searchTweets();
    
    });​
    

    also to help heres a working jsfiddle
    http://jsfiddle.net/th3fallen/jc2Kf/

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

Sidebar

Related Questions

I am using JSON.parse to parse this JSON string [{created_at:2012-01-24T22:36:21Z,name:joe,age:42,updated_at:2012-01-24T22:36:21Z}] However I am simply
How can i convert this JSON array: This is a serialized JSON array 2012-06-18
i have this JSON object: {error:null, result:[{id:1234567890, count:1, recipients: [u3848, u8958, u7477474 ], dateCreated:2012-06-13T09:13:45.989Z
I am having this rather long json output in my controller, I wish to
I have a YQL output JSON string at this URL: YQL JSON I found
Why does this output a 0 byte file? <?php $jsonurl = http://do.convertapi.com/Web2Pdf/json/?curl=http://stackoverflow.com/; $json =
How do I transform this JSON object: context:{#text:[Most Visited Pages , Hall Residents Advanced
I have this JSON http://www.progmic.com/ielts/retrive.php that I need to parse. When I do it
I am parsing this JSON file (correctly, it works with the UITextFields): {longitude:[37.786793,39.388528],latitude:[-122.395416,-78.887734]} ind
I'm getting this json string info from the server : {members:[[sd2840d,Johny],[jkld341,Marry]]} So I store

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.