I'm writing some code in Go lang. I'm new to Go language and I'm stuck at a place. I'm right now having a map object which looks like this
count := map[string]int{}
count["Kitchen"] = 1
count["Electronics"] = 1
the output looks like this: map[Electronics:1 Kitchen:1]
Now I'm doing
answer, _ := json.Marshal(count)
The expected answer should look something like this:
{"Kitchen": 1, "Electronics": 1}
But it is coming like this:
[123 34 69 108 101 99 116 114 111 110 105 99 115 34 58 49 44 34 75 105 116 99 104 101 110 34 58 49 125]