jquery - Parsing json "meta" from Dribble api -
i have json dribble api :
/**/foo({ "meta": { "x-ratelimit-limit": 60, "x-ratelimit-remaining": 59, "x-ratelimit-reset": 1429948020, "link": [ [ "https://api.dribbble.com/v1/users/234460/shots?access_token=accesstoken\u0026callback=foo\u0026page=4\u0026per_page=2", { "rel": "next" } ], [ "https://api.dribbble.com/v1/users/234460/shots?access_token=accesstoken\u0026callback=foo\u0026page=2\u0026per_page=2", { "rel": "prev" } ] ], "status": 200 }, "data": [ {
i can of need "data" in "playershots" object, can see starting @ end there, :
$.each(playershots.data, function (i, shot) { html.push('<div class="%id%imageframe">'); html.push('<img src="' + shot.images.teaser + '" alt="' + shot.title + '" data-url="' + shot.html_url + '" />');
but need "link" "meta" object, , if :
json.stringify(playershots.meta)
it shows me no sign of "link".
{"x-ratelimit-limit":60,"x-ratelimit-remaining":58,"x-ratelimit-reset":1429948980,"status":200}
so can't :
json.stringify(playershots.meta.link)
please help.. how links..? preferably reference "next" , "previous" know have.
use
var link = result.meta.link; var nextlink = link[0][0]; var prevlink = link[0][1];
result.meta.link
return array result
Comments
Post a Comment