go-simplejson | a Go package to interact with arbitrary JSON | JSON Processing library
kandi X-RAY | go-simplejson Summary
kandi X-RAY | go-simplejson Summary
a Go package to interact with arbitrary JSON
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-simplejson
go-simplejson Key Features
go-simplejson Examples and Code Snippets
Community Discussions
Trending Discussions on go-simplejson
QUESTION
I am working in Golang,and using the package github.com/bitly/go-simplejson
I will receive a Json from the client side, I already constructed the json object using that package. Now I need to iterate over all the "first level" elements of that Json. The Json is something like this:
...ANSWER
Answered 2017-Nov-26 at 16:17In Go you can use the range
loop to iterate over a map
the same way you would over an array
or slice
. The values provided to you by the range loop on each iteration will be the map's keys and their corresponding values.
So you can simply change your loop line from:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-simplejson
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page