With an http GET request I'm importing a JSON response into a string. I want to add the JSON string into a struct array with json.Unmarshal. This works only when I remove at the beginning the fields data & categoryGroups. They are not part of my strucs. So by removing {"data":{"categoryGroups": at the beginning and }} at the end.
This can be done with a strings.Replace, but I'm wondering if there is a neater solution?
{"data":{"categoryGroups":[{"name":"...."}]}]}}