We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 807836a + 21a77fa commit 5827eb3Copy full SHA for 5827eb3
gjson.go
@@ -283,7 +283,8 @@ func (t Result) ForEach(iterator func(key, value Result) bool) {
283
}
284
285
286
-// 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.
287
+// If the result is not a JSON object, the return value will be an empty map.
288
func (t Result) Map() map[string]Result {
289
if t.Type != JSON {
290
return map[string]Result{}
0 commit comments