I'm using the following jQuery code to get a JSON file from CouchDB.
Function getURL() {
var api_url = 'http://127.0.0.1:5984/couchcontentqueue/_design/DocCollections/_view/view_all_by_url_name?key="favorite-flickr-photos"&?callback=?';
$.getJSON(api_url, function(json) {
var type = json.type;
var desc = json.description;
$("#dropBox h3").html(type);
$("#dropBox p").html(desc);
});
};
When I do a GET on that URL it provides back the following:
{
"total_rows":6,
"offset":5,
"rows":[
{"id":"f5ba37e5af406ab079d596f7a1f30a2d","key":....}
]
}
Firebug gives me the following error: invalid label http://127.0.0.1:5984/couchcontentqueue/_design/DocCollections/_view/view_all_by_url_name?key=%22favorite-flickr-photos%22&?callback=jsonp1304111285023 Line 1
I can't figure out how to get past that first line to get to the actual JSON object. Any ideas? Thanks.