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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:13:51+00:00 2026-05-27T08:13:51+00:00

I’m trying to get a hold of the data returned from getJSON, but I

  • 0

I’m trying to get a hold of the data returned from getJSON, but I just can’t get it to work. I’ve tried the same code with the search.twitter API, and that works fine, but it doesn’t work with the other site. I know that the data is returned cause I can find it when I use the Inspector. The values I find through the Inspector are:

[{"id":62093,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"It Will Follow The Rain"},{"id":62094,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Pistol Dreams"},{"id":62095,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Troubles Will Be Gone"},{"id":80523,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Love Is All"},{"id":80524,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"I Won't Be Found"},{"id":80525,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Where Do My Bluebird Fly"},{"id":80526,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Sparrow And The Medicine"},{"id":80527,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"Into The Stream"},{"id":81068,"type":"Song","artist":{"id":12382,"type":"Artist","nameWithoutThePrefix":"Tallest Man On Earth","useThePrefix":true,"name":"The Tallest Man On Earth"},"title":"The Blizzards Never Seen The Desert Sands"}]

So I know they are returned from the server.

and my js code is:

function searchSongsterrForTab(){
    var artist = "\"The Tallest Man On Earth\""
    var url = "http://www.songsterr.com/a/ra/songs/byartists.json?callback=?&artists=" + artist;

    $.ajax({
        url: url,
        dataType: 'jsonp',
        success: function(data){
            $.each(data, function(i, item){
                console.log(item);
            });
        }
    });
}

I’ve tried all sorts of different code, but I just can’t seem to print the values.

All help are truly appreciated!

  • 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-27T08:13:52+00:00Added an answer on May 27, 2026 at 8:13 am

    You specified dataType as jsonp but the service is just returning json which you cannot use crossdomain.

    jQuery’s error message is: "jQuery1710014922410249710083_1323288745545 was not called" which means that the callback is not getting called as it should be.

    Update:

    There is a way how you can retrieve the data even when the service doesn’t support JSONP format. See this link for details.

    My example is using jquery.xdomainajax.js script which is routing the ajax request to YQL which is able to retrieve a whole HTML page in a JSONP format. So the example below is using normal HTML page to retrieve the data.

    • Pros:
      • You are able to retrieve any HTML content.
      • It is very flexible as you are not depending what the webservice can get you.
    • Cons:
      • It is slower, because you are using Yahoo service to process and fetch whole HTML data.
      • There is also more data transferred.

    See THIS snippet for working example.

    Code:

    var artist = "The Tallest Man On Earth";
    
    $.ajax({
      url: 'http://www.songsterr.com/a/wa/search?pattern=' + escape(artist),
      type: 'GET',
      success: function(res) {
        // see http://www.songsterr.com/a/wa/search?pattern=The%20Tallest%20Man%20On%20Earth
        // 1) res.responseText => get HTML of the page
        // 2) get odd anchors inside (it is zero-indexed) => get anchors containing song names
        // 3) map array of anchor elements into only their text => get song names
        var songs = $(res.responseText).find('div.song a:odd').map(function(i, el) { return $(el).text() });
        console.log(songs);
      }
    });
    

    This is just a demonstration. If you need any other data from the page then inspect structure of the page, retrieve it and process and shown in the example above.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I want to construct a data frame in an Rcpp function, but when I
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.