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.
()
| 311 | // Map returns back a map of values. The result should be a JSON object. |
| 312 | // If the result is not a JSON object, the return value will be an empty map. |
| 313 | func (t Result) Map() map[string]Result { |
| 314 | if t.Type != JSON { |
| 315 | return map[string]Result{} |
| 316 | } |
| 317 | r := t.arrayOrMap('{', false) |
| 318 | return r.o |
| 319 | } |
| 320 | |
| 321 | // Get searches result for the specified path. |
| 322 | // The result should be a JSON array or object. |