code: func (a AsyncJobResult) Result(i interface{}) error {
  	if a.JobStatus == Failure {
  		return a.Error()
  	}
  
  	if a.JobStatus == Success {
  		m := map[string]json.RawMessage{}
  		err := json.Unmarshal(*(a.JobResult), &m)
  
  		if err == nil {
  			if len(m) >= 1 {
  				if _, ok := m["success"]; ok {
  					return json.Unmarshal(*(a.JobResult), i)
  				}
  
  				// otherwise, pick the first key
  				for k := range m {
  					return json.Unmarshal(m[k], i)
  				}
  			}
  			return errors.New("empty response")
  		}
  	}
  
  	return nil
  }
docs: // Result unmarshals the result of an AsyncJobResult into the given interface