I am by no means literate in GoLang and cannot seem to get around a problem accessing values produced by parseJSON… I’m iterating on a collection which is working fine but inside that iteration I’m calling a partial and accessing simple context values fine but one context value (.overview) is another collection/map containing another collection “children” that looks like this:

[map[style:normal _key:8a1fd7b434db11443bf33bc3a2428b64 _type:block children:[map[_key:4CqD4zbB _type:span marks:[] text:WALL·E is the last robot left on an Earth that has been overrun with garbage and all humans have fled to outer space. For 700 years he has continued to try and clean up the mess, but has developed some rather interesting human-like qualities. When a ship arrives with a sleek new type of robot, WALL·E thinks he’s finally found a friend and stows away on the ship when it leaves.]] markDefs:[]]]

I want to access the value of the key “text” but cannot seem to figure out how to do so.

I’ve tried {{ .overview.children.text }}

also {{ index .overview “children” }} which gives me an error “error calling index: cannot index slice/array with type string”

Any help would be great.

{{ printf "#v:%#v)" .overview }}
this would show the data structure.
(maybe cut the long text)

I have in a json front matter:

    "data":  [
                   "style": "normal" 
                 ,  "_key": "8a1fd7b434db11443bf33bc3a2428b64"
                 ,  "_type": "block" 
                 , "children": {   "_key": "4CqD4zbB"
                                 , "_type": "span"
                                 , "marks": []
                                 , "text": "WALL·E is the last robot left on an Earth"
                 ,  "markDefs": []

But I probably got it wrong - since it works:

{{ range $overview := }}
  {{ printf "#v:%#v)" $overview }}
  1) {{ $overview.children.text }}
{{ end }}


#v:map[string]interface {}{"style":"normal", "_key":"8a1fd7b434db11443bf33bc3a2428b64", "_type":"block", "children":map[string]interface {}{"_key":"4CqD4zbB", "_type":"span", "marks":[]interface {}{}, "text":"ALL·E is the last robot left on an Earth"}, "markDefs":[]interface {}{}})
 1) WALL·E is the last robot left on an Earth