我正在开发一个简单的电影列表应用程序。 我正在使用腐烂的西红柿api。以下是json:
movies": [{ "id": "771310572", "title": "Cloud Atlas", "year": 2012, "mpaa_rating": "R", "runtime": 163, "release_dates": { "theater": "2012-10-26" }, "ratings": { "critics_rating": "Fresh", "critics_score": 80, "audience_score": 98 }, "synopsis": "Cloud Atlas explores how the actions and consequences of individual lives impact one another throughout the past, the present and the future. Action, mystery and romance weave dramatically through the story as one soul is shaped from a killer into a hero and a single act of kindness ripples across centuries to inspire a revolution in the distant future. Each member of the ensemble appears in multiple roles as the stories move through time. -- (C) Warner Bros.", "posters": { "thumbnail": "http://content6.flixster.com/movie/11/16/71/11167192_mob.jpg", "profile": "http://content6.flixster.com/movie/11/16/71/11167192_pro.jpg", "detailed": "http://content6.flixster.com/movie/11/16/71/11167192_det.jpg", "original": "http://content6.flixster.com/movie/11/16/71/11167192_ori.jpg" }, "abridged_cast": [{ "name": "Tom Hanks", "id": "162655641", "characters": ["Dermot 'Duster' Hoggins", "Dr. Henry Goose", "Isaac Sachs", "Valleysman Zachry"] }, { "name": "Halle Berry", "id": "162652386", "characters": ["Jocasta Ayrs", "Luisa Rey", "Meronym"] }, { "name": "Jim Broadbent", "id": "162653369", "characters": ["Vyvyan Ayrs"] }, { "name": "Hugo Weaving", "id": "162709905", "characters": ["Bill Smoke", "Nurse Noakes", "Old Georgie"] }, { "name": "Jim Sturgess", "id": "563717190", "characters": ["Adam Ewing", "Hae-Joo Im"] }]
我能够获得第一个显示电影列表和电影列表项目ontap的列表视图,我可以加载下一个视图来显示电影详细信息。
我被困在xtemplate中显示abridged_cast。如果我使用{abridged_cast}页面显示对象,对象。
我无法找到任何将从此数组中提取值并显示的函数。 如何在模板中显示数组内容?
感谢。