JQuery: Merge multiple JSON results

后端 未结 3 461
离开以前
离开以前 2021-01-13 19:30

Situation: User want to import Youtube playlist in a JQuery site using Youtube\'s JSON API.

Problem: Youtube only gives back first

3条回答
  •  被撕碎了的回忆
    2021-01-13 20:13

    1. You should be able to use the start-index parameter to call the next set of results from google. You could probably call your fetchPlaylist() method recursively while changing the start-index for each call until you've gotten all of them.

    2. use .extend() to merge the results

提交回复
热议问题