My state legislature website offers a restful api.
What is the correct javascript / jquery code to fetch the value of kslegislature.org/li/api/v5/rev-1/bill_listing/ into a variable?
I can not seem to construct a working .getJSON request to pull the data.
Ultimately I want to be able to work with values like
var kslegBills = RETURNED DATA;
console.log(kslegbills.content[1].BILLNO)
complete API guide available here: http://www.google.com/url?sa=D&q=http://kslegislature.org/kliss_restian_interface_guide_v5.odt
A gentle shove in the right direction would be greatly appreciated.
jQuery.getJSON("http://www.kslegislature.org/li/api/v5/rev-1/bill_listing/&callback=?", [], function(data, textStatus) { var kslegbills = data; alert(textStatus); } )
UPDATE:
Thanks to @JackWinks I was able to get a working request through a PHP wrapper. Working model at http://kansasgrassroots.com/files/kslegbills/
It works in chrome, but not firefox or safari. I suspect it is because of the large size of the request that FF and Safari are timing out before data is returned.