#Multiple dict keys like python with json

8 messages · Page 1 of 1 (latest)

tardy steeple
#

on golang is there the possibility to use multi key with dicts? come the python I'm used to do:

dict = {"Test": {"0": {"name": "we"}, "1": {"name": "ewewwe"}}}

print(dict["Test"]["0"]["name"])
print(dict["Test"]["1"]["name"])

but on go I can't find a way to do it without struct

vivid cradle
#

map[string]map[string]map[string]string

#

Use a struct

#

And hopefully make these json less badly structured if this is real

winged lantern
#

bc how he can get 0 or 1

#

there are anonymous numbers i think

tardy steeple