When I make a discover request with javascript and use JSON.parse, how do I access the data of the other results? Like the 2nd, 3rd, 4th,... etc result? Also, how do I use the sort by parameter?
찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.
이 항목을 평가하거나 목록에 추가할까요?
회원이 아닌가요?
Travis Bell님의 댓글
8월 30, 2013 at 4:41 오후
Do you mean the items in returned in the results of a list? If so, the results field is just an array so if you loop through it, you can get the results. If you mean pages, just add
page=X
to each request and you'll get each subsequent page.There's an example iterating through the array of results here. Just make sure to change the api key on line 11.
Cheers.
Brent님의 댓글
11월 22, 2015 at 11:06 오후
That link takes me to a page with the text "Jquery Test [new line] Results" with no other text
Travis Bell님의 댓글
11월 23, 2015 at 10:40 오전
Hi Brent,
Make a copy of the source, change line 11 with your API key and then run it. You won't be able to run the file as is, it's just a demo.