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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:12:29+00:00 2026-05-26T07:12:29+00:00

I have a test account on iriscouch I am trying to write a routine

  • 0

I have a test account on iriscouch

I am trying to write a routine to process the JSON returned.

function getMyJson(url) {
    $('#dispJson').html('<h3>Json Data from: ' + url);
    data = $.getJSON(url);
    $.each(data, function(key, val) {
        $('#dispJson').append('key: ' + key + ' Val: ' +  val + '<br />');
    });
    return true;
};

But I appear to be getting JSON back, but not what I was expecting

Results

key: readyState Val: 1
key: setRequestHeader Val: function ( name, value ) { if ( !state ) { var lname = name.toLowerCase(); name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }
key: getAllResponseHeaders Val: function () { return state === 2 ? 
......
jQuery.type( elem ); if ( type === "array" ) { deferred.done.apply( deferred, elem ); } else if ( type === "function" ) { callbacks.push( elem ); } } if ( _fired ) { deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); } } return this; }
key: statusCode Val: function ( map ) { if ( map ) { var tmp; if ( state < 2 ) { for( tmp in map ) { statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; } } else { tmp = map[ jqXHR.status ]; jqXHR.then( tmp, tmp ); } } return this; }

In fact I get that response from whatever url I use on the IrisCouch site.

I have JSONP set to true and I also tested with ?callback=? appended to the URL.

I am hoping someone recognises the output I am getting and can advise me as to what I have misunderstood or done wrong.

Thanks mcl

  • 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-26T07:12:30+00:00Added an answer on May 26, 2026 at 7:12 am

    You’re setting data to the XHR object returned by jQuery. Remember that XHR is asynchronous so you can’t expect the result to be immediately available.

    Instead, you should be doing something like this:

    $.ajax({
        url: url,
        dataType: 'json',
        success: function(data) {
            $.each(data, function(key, val) {
                $('#dispJson').append('key: ' + key + ' Val: ' +  val + '<br />');
            });
        }
    });
    

    Be sure to read through the documentation: http://api.jquery.com/jQuery.getJSON/

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

Sidebar

Related Questions

I have paypal sandbox test account. I am trying it with HTML form. It
I have a URL like: http://url.test.com/account/name/pages/Stuff.html I want to take 'Stuff' and apply that
I have created a test account with Authorize.net and am using ActiveMerchant to process
I'm trying to build a ActiveSync client application. I have a test Hotmail account,
I have some test code that i'm just trying to use to figure out
I have a folder in my Google Reader account called Test, with 200 items
I have configured some products and an in app purchases test account. I am
I have registered on PayPal Sandbox, then I added Seller Preconfigured test account. As
I have created a test account with authorize.net. I have read its documentation and
I have a set of test accounts that are going to be created but

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.