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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:36:47+00:00 2026-05-25T17:36:47+00:00

I am getting a successful response back, but I do not fully understand how

  • 0

I am getting a successful response back, but I do not fully understand how to loop through the data I get back. I put in an alert in the success callback, but that wasn’t called. Here is the markup and script:

<input type="text" name="searchValue" id="searchValue"/>
<input type="button" name="btnGetLicenes" value="Get Licenses" id="btnGetLicenses"/>
<div id="Licenses"></div>
<script>

    $.getJSON("http://data.fcc.gov/api/license-view/basicSearch/getLicenses?searchValue=Verizon Wireless&format=jsonp&callback=?",
        function (data) {
            $.each(data.License, function (i, lic) {
                $('#Licenses').append('<p>' + lic.licName + '</p>');          
                alert("hello"); //This is not called.

            });
        });

</script>

In the above scenario, I am not using the search text box, I just hard-coded Verizon Wireless for testing.

  • 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-25T17:36:47+00:00Added an answer on May 25, 2026 at 5:36 pm

    You have an intermediary data.Licenses.License node which represents the collection you can loop through:

    $.getJSON('http://data.fcc.gov/api/license-view/basicSearch/getLicenses?searchValue=Verizon+Wireless&format=jsonp&jsonCallback=?',
        function (data) {
            $.each(data.Licenses.License, function (i, lic) {
                $('#Licenses').append('<p>' + lic.licName + '</p>');          
            });
        }
    );
    

    Also $alert is not a function that you can expect to be called. Maybe you meant alert.

    Also notice that according to the documentation the parameter that allows you to set the JSONP callback name is jsonCallback, not callback as in your example.

    Also don’t forget to URL encode your query string parameters or you might get unexpected/wrong behavior from the server: searchValue=Verizon Wireless should be searchValue=Verizon+Wireless.

    And finally here’s a live demo to see this in action.

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

Sidebar

Related Questions

I am trying to validate weather the connection was successful but have been getting
I'm submitting a command to a ssh session and getting an XML response back
I am trying to make icon extractor i am successful in getting icon to
Getting a 'marshal data too short' error when trying to install the mysql gem
I'm working to create an autosuggest and am having problems getting the data to
I seem to be getting a Caught NoReverseMatch error. I am not so sure
I've been going through the documentation for getting ActiveRecord validation working with ActiveModel .
I'm using xauth, and can successfully get an access token, but can't work out
I have a background script that is responsible for getting and setting data to
I am using at my iPhone app with this code but I can not

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.