how to parse json correctly I have the following json file
{
"hello": {
"title": "Golang",
"story": [
"Go lang story",
"Channel story"
],
"options": [
{
"text": "That story",
"arc": "west"
},
{
"text": "Gee",
"arc": "east"
}
]
},
"world": {
"title": "Visiting",
"story": [
"Boo",
"Doo",
"Moo",
"Qoo"
],
"options": [
{
"text": "weird",
"arc": "west"
},
{
"text": "funny",
"arc": "north"
}
]
}
}
I've created these structs for the inner part
type chapter struct{
Title string `json:"title"`
Story []string `json:"story"`
Option []option `json:"options"`
}
type option struct {
Text string `json:"text"`
Arc string `json:"arc"`
}
but I don't know how to parse wrappers like "hello" and "world"