Decode JSON directly to the types you want instead of decoding, in interface{}.
Declare types that match the structure of your JSON data. Use structures for objects and JSON fragments for JSON arrays:
type transform struct {
}
type urlTransform struct {
Item string
Transform transform
}
var transforms []urlTransform
exported ( ).
JSON :
err := json.Unmarshal(data, &transforms)
err := json.NewDecoder(reader).Decode(&transforms)