type FileList struct { List []string`json:"list"` URL []string`json:"url"` }
type AllJSON struct { Title string`json:"title"` Split string`json:"split"` Files map[string]FileList `json:"files"` }
Resolve
1 2 3 4 5 6 7 8 9 10 11
var allJSON AllJSON var fileList FileList json.Unmarshal([]byte(jsonText), &allJSON) for k, v := range allJSON.Files { fileList = v println(k) for i := 0; i < len(fileList.List); i++ { println(fileList[i].List) println(fileList[i].URL) } }