json.Unmarshal convert map to slice
Advertisements Given the following JSON string: { "username":"bob", "name":"Robert", "locations": [ { "city": "Paris", "country": "France" }, { "city": "Los Angeles", "country": "US" } ] } I need a way to unmarshal this into the a struct like this: type User struct { Username string Name string Cities []string } Where Cities is a slice… Read More json.Unmarshal convert map to slice