How would I get this little program to work? I'm trying to read a bunch of cookies from a json string into a map and print the map. The below program prints nothing.
type htmlDoc struct {
cookies map[string] string `json:"Cookies"`
}
func main() {
jsonString := `{ Cookies: {
["name1": "Value1"],
["name2": "Value2"],
["name3": "Value3"]
}}`
var doc htmlDoc
json.Unmarshal([]byte(jsonString), &doc)
for name, value := range doc.cookies {
fmt.Printf("%s\t%s\n", name, value)
}
}