I have a mapping inside a struct as follow :
type Red struct {
**other
Tel map[string]string `json:"Tel"`
}
I receive my data json formated the following way
{
"Params":[{"rewew": "tref"},{"Value": "x"},....]
}
And i'm searching for the most effective way of populating my struct with the data so that
Tel["rewew"] = "tref"
Tel["Value"] = "x"
For the rest of the values it works fine when those are simplier values when doing this:
var t Red
decode := json.NewDecoder(req.Body)
decode.Decode(&t)
But i'm having trouble with maps