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

The Archive Base Latest Questions

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

I’ve managed to get a JSON output from my database for use with jQuery

  • 0

I’ve managed to get a JSON output from my database for use with jQuery UI AutoComplete, and that’s working fine.

The trouble with it is, it seems the AutoComoplete plugin does all the parsing of JSON data for me, so I’m still to work out how that’s actually done.

I have a URL, http://test.hartnollguitars.co.uk/jsonOut/products.aspx?term=761294042656&barcode=yes (as an example) which gives me a single record from the same JSON output as I use for Autocomplete, I am trying to use this single record output for a single case.

So I’ve been Googling and messing around with jQuery getJSON, but I seem unable to get the info.

$.getJSON("jsonOut/products.aspx?barcode=yes", function () { alert(data.label);  });

Is kind of where I’m at now, I know this is wrong and I have tried various other permutations of this code following examples from the jQuery site, but I just can’t get the output I need.

It’s obviously because I’ve got no idea what I am doing, but can someone just explain how you:

  1. Get data from a single record like this
  2. Get data from a series of data and loop through to display the output (for example from an FQL output from the Facebook Graph for a simple object such as events)

All help much 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-26T20:29:02+00:00Added an answer on May 26, 2026 at 8:29 pm

    Remeber to use an absolute url, not a relative. The code you have pasted will append the url to the current directory, so it will only work if it is coming from /.
    The JSON being returned is an array, so you have to dereference an element:

    $.getJSON("/jsonOut/products.aspx?barcode=yes", function (data) { alert(data[0].label);  });
    

    or the more useful thing to do would be:

    $.getJSON("/jsonOut/products.aspx?barcode=yes", function (data) {
       for (var i = 0; i < data.length; ++i) {
          alert(data[i].label);
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.