Key names with minus

Hello,

I’m reading a JSON file with

{{ range $item := getJSON "data/references.json" }} 

but I have got some keys with - e.g.

[
   { "id" : "mykey", "container-title" : "a container name" }
]

I can get access of the values by

$item.id

but not with

$item.container-title
$item.(container-title)
$item."container-title"

How can I get access to a key with a minus within the key name?

Thanks

Phil

index $item “container-title”

thanks for this, works well, I undstand the “index” first in that way, that it works only for numerical values :slightly_smiling: and not also for string values

Index in this case is a built-in func in Go templates that works for both slices and maps.