How to parse below two JSON and print values of "c"
1)
{
"a": {
"b": {
"c": 123
},
"b": {
"c": 456
}
}
}
2)
{
"a": {
"b": {
"c": 444
}
}
}
Below struct help in parsing but then how to iterate over b, it is not array? Please help.
type Data struct {
A struct {
B struct {
C int `json:"c"`
} `json:"b"`
} `json:"a"`
}