我是 json 新手,我真的在为我的数据格式苦苦挣扎。
它需要具有以下格式:music.genre.album,但只需genre.album也可以。
请问有人可以帮助以下结构吗?我将使用 getJSON 来遍历它。
{"music": [{
"Genre_Blues": [{
"Album": "224",
"Path": "images/library/",
"FileName": "AlbumCover224.png"
},
{
"Album": "277",
"Path": "images/library/",
"FileName": "AlbumCover277.png"
},
{
"Album": "885",
"Path": "images/library/",
"FileName": "AlbumCover885.png"
}],
"Genre_Jazz": [{
"Album": "442",
"Path": "images/library/",
"FileName": "AlbumCover442.png"
},
{
"Album": "467",
"Path": "images/library/",
"FileName": "AlbumCover467.png"
},
{
"Album": "724",
"Path": "images/library/",
"FileName": "AlbumCover724.png"
}],
"Genre_Rock": [{
"Album": "022",
"Path": "images/library/",
"FileName": "AlbumCover022.png"
},
{
"Album": "609",
"Path": "images/library/",
"FileName": "AlbumCover609.png"
},
{
"Album": "067",
"Path": "images/library/",
"FileName": "AlbumCover067.png"
}]
}]
}