Skip to content

Commit

Permalink
Update datasource.go
Browse files Browse the repository at this point in the history
When we have a request with IF and LET statements get last result elements #18
  • Loading branch information
josselinchevalay committed Sep 19, 2024
1 parent f1681f3 commit eef15dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugin/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit eef15dd

Please sign in to comment.