It works as it returns the data. but it gives me NaN for the rep.name & rep.parent_committee _id. I see no reason as to why. A similar loop does returen strings for names and last names.
thx
You’re not initializing rep there, so you’re going to get the same information (probably nothing unless you initialize rep somewhere else) for the number of instances in the response.results object.
I think I am getting closer, but…when i run this i do see the results in the console. But not when i try to see in the page.
$.get("https://congress.api.sunlightfoundation.com/bills?apikey=****, function (response) {
console.log(response);
var i=0;
var html = '';
for(i=0; i<response.results.length; i++){
var objList = response.results[i];
console.log(objList);
html += objList[i] + '<br />';
$("#ct0").append(html);
}
}, "jsonp");