I. parsing json array strings
data:= `[
{
"name": "aaa",
"id": "54546221"
},
{
"name": "bbb",
"id": "89875646"
}
]`
`
dataArr := []interface{}{}
err := json.Unmarshal([]byte(data), &dataArr)
II. Parsing json object string
data:= `{
"name": "aaa",
"id": "54546221"
}`
`
dataArr := map[string]interface{}{}
err := json.Unmarshal([]byte(data), &dataArr)
how do I parse an data json string without knowing the data format?