Enable JSONP (http://docs.couchdb.org/en/latest/config_reference.html#httpd-configuration-options) and then add ?callback=foo. couchdb will then return foo({"rows"... );
I failed to find a write-up of JSONP in our manual or even a mention on the wiki, sorry about that. B. On 30 July 2013 01:06, Hank Knight <[email protected]> wrote: > Results are returned in JSON format: > https://zurv3aqzm.iriscouch.com/fruit/_design/zzz6/_view/zzz6?limit=101&group=true > > Is there a way to wrap the JSON in a way that could be used for a callback? > > Like this: > > xyz({"rows":[ > {"key":"blueberry","value":1}, > {"key":"cranberry","value":1}, > {"key":"gooseberry","value":3}, > {"key":"grapefruit","value":2}, > {"key":"lemon","value":1}, > {"key":"lime","value":1}, > {"key":"orange","value":1}, > {"key":"peach","value":2}, > {"key":"plumb","value":1}, > {"key":"strawberry","value":4}, > {"key":"watermelon","value":2} > ]})
