In Go, I usually decouple my JSON into a structure and read values from the structure. It works very well.
This time I only care about a specific element of the JSON object and because the general JSON object is very large, I do not want to create a structure.
Is there a way in Go so that I can search for values in a JSON object using keys or iterating through arrays as usual.
Given the following JSON, how can I pull only a field title.
{
"title": "Found a bug",
"body": "I'm having a problem with this.",
"assignee": "octocat",
"milestone": 1,
"labels": [
"bug"
]
}
source
share