diff --git a/pkg/plugin/datasource.go b/pkg/plugin/datasource.go index 9812d1f..38a703c 100644 --- a/pkg/plugin/datasource.go +++ b/pkg/plugin/datasource.go @@ -597,7 +597,7 @@ func (r *Datasource) query(query string) (queryResponseData, error) { // log.DefaultLogger.Info(fmt.Sprintf("arrResp: %s", arrResp)) - dataMap, ok := array[0].(map[string]interface{}) + dataMap, ok := array[len(array)-1].(map[string]interface{}) if ok == false || isArray == false { return undefined, fmt.Errorf("invalid queryResponse array type") }