I have this json file,In this json file there are n number of key as we see A1,B1......................................................................zn, a1,a2.......................................................................an, b1..........................................................................bn etc.
{
"_id": "5746992a54c1ae24d53ce651",
"A1": [
{
"a1": [
"abc",
"def",
"ghi"
]
},
{
"a2": [
"abc",
"def",
"ghi"
]
},
.
.
,
{
"an": [
"abc",
"def",
"ghi"
]
}
],
"B1": [
{
"b1": [
"abc",
"def",
"ghi"
]
},
{
"b2": [
"abc",
"def",
"ghi"
]
},
{
"bn": [
"abc",
"def",
"ghi"
]
}
],
.
.
.
,
"Bn": [
{
"b1": [
"abc",
"def",
"ghi"
]
},
{
"b2": [
"abc",
"def",
"ghi"
]
},
{
"bn": [
"abc",
"def",
"ghi"
]
}
]
}
how to call their structure in golang
type Level1 struct {
TAGID bson.ObjectId `json:"_id" bson:"_id"`
LEVELTAG2 []Level2 `json:"level2" bson:"level2"`
}
type LevelTag2 struct{
LEVEL3 []string `json:"level3" bson:"level3"`
}
I build this structure in golang is there right way or any other way please help me out