Skip to content

Instantly share code, notes, and snippets.

@simt2
Created February 21, 2017 08:11
Show Gist options
  • Save simt2/16ed876bcaf92e4c91769abe75e47da6 to your computer and use it in GitHub Desktop.
Save simt2/16ed876bcaf92e4c91769abe75e47da6 to your computer and use it in GitHub Desktop.
// LoadBreadcrumb retrieves the top level nodes used to display the navigation
func LoadBreadcrumb() []gjson.Result {
r := MeshGetRequest("demo/navroot/?maxDepth=1&resolveLinks=short")
defer r.Body.Close()
bytes, _ := ioutil.ReadAll(r.Body)
json := gjson.ParseBytes(bytes).Get("root.children").Array()
return json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment