Got stucked
-
Hi there,
I’m consuming a json feed from the nhl and want to display the upcoming games. The feed url is:
https://statsapi.web.nhl.com/api/v1/schedule
My attempt just for testing was like this one:
[jsoncontentimporter url=https://statsapi.web.nhl.com/api/v1/schedule]
{subloop-array:dates:-1}
{date}
{subloop-array:dates.games:-1}
{gameType} ({season})
{/subloop-array:dates.games}
{/subloop-array:dates}
[/jsoncontentimporter]This worked so far. Now I wanted to display the names of the teams:
[jsoncontentimporter url=https://statsapi.web.nhl.com/api/v1/schedule]
{subloop-array:dates:-1}
{date}
{subloop-array:dates.games:-1}
{teams.away.team.name}
{teams.home.team.name}
{/subloop-array:dates.games}
{/subloop-array:dates}
[/jsoncontentimporter]I tried different subloops around dates.games.teams but was not able to get a result. Can You please guide me in the right direction here?
Many thanx ahead!
Cheers
The topic ‘Got stucked’ is closed to new replies.