Unmarshal JSON into map

Viewed 10885

I have a really simple JSON file, something like this, but with thousands of strings:

{"fruits":["apple","banana","cherry","date"]}

and I want to load the fruits into a

map[string]interface{}

What is the best method? Is there a way where I don't need to iterate over each element and insert into the map using a loop?

1 Answers
Related