Actually there is JSON, you need to convert it into a tree. And get access to the nodes. Tried it like this. Immediately I’ll clarify that the JSON structure can change (some fields can be added or deleted, but the main ones are always the same)
package main import ( "encoding/json" //"fmt" ) //type nestedMaps map[string]nestedMaps func main() { byt := []byte(`{ "node1": { "value": "1", "node2": { "value": "2", "node4": { "value": "4" } }, "node3": { "value": "3" } } }`) var dat map[string]interface{} if err := json.Unmarshal(byt, &dat); err != nil { panic(err) } //fmt.Println(dat["node1"]["node2"]["node4"]["value"]); }