Skip to content

Commit

Permalink
Merge pull request #226 from ifraixedes/if/fix-doc-map-method
Browse files Browse the repository at this point in the history
Fix Map method documentation
  • Loading branch information
tidwall committed Sep 1, 2021
2 parents 807836a + 21a77fa commit 5827eb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gjson.go
Expand Up @@ -283,7 +283,8 @@ func (t Result) ForEach(iterator func(key, value Result) bool) {
}
}

// Map returns back an map of values. The result should be a JSON array.
// Map returns back a map of values. The result should be a JSON object.
// If the result is not a JSON object, the return value will be an empty map.
func (t Result) Map() map[string]Result {
if t.Type != JSON {
return map[string]Result{}
Expand Down

0 comments on commit 5827eb3

Please sign in to comment.