I'm trying to create a map with an array containing maps. My code:
Go:
func main() {
m := map[string][]map[string]string{
"photos": [{"a":"1"}, {"b": "2"}],
"pictures": [{"a":"1"}, {"b": "2"}]
}
fmt.Println(m)
}
What is wrong with this? Is this possible?
http://play.golang.org/p/USm9kqDANn
package main
import "fmt"
func main() {
m := map[string][]map[string]string{
"photos": {{"a": "1"}, {"b": "2"}},
"pictures": {{"a": "1"}, {"b": "2"}},
}
fmt.Println(m)
}