The Movie Database-ondersteuning

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?

3 antwoorde (op blad 1 van 1)

Jump to last post

Like the 2nd, 3rd, 4th,... etc result?

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.

That link takes me to a page with the text "Jquery Test [new line] Results" with no other text

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.

Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.

Globaal

s fokus op soekbalk
p open profielkieslys
esc sluit ’n oop venster
? open sneltoetsvenster

Op mediablaaie

b gaan terug (na ouer waar van toepassing)
e gaan na wysigblad

Op TV-seisoenblaaie

(regterpyl) gaan na volgende seisoen
(linkerpyl) gaan na vorige seisoen

Op TV-episodeblaaie

(regterpyl) gaan na volgende episode
(linkerpyl) gaan na vorige episode

Op alle beeldblaaie

a open beeldtoevoegvenster

Op alle wysigingsblaaie

t open vertaalkieser
ctrl+ s dien form in

Op besprekingsblaaie

n skep nuwe bespreking
w tokkel kykstatus
p tokkel openbaar/privaat
c tokkel maak oop/toe
a open aktiwiteit
r reageer op bespreking
l gaan na laaste reaksie
ctrl+ enter dien u boodskap in
(regterpyl) volgende blad
(linkerpyl) vorige blad

Instellings

Wil u hierdie item gradeer of tot ’n lys toevoeg?

Teken aan