I'm developing this external adapter for my Chainlink node. From RapidAPI I call a POST API call based on the name field. This is the returned body.
In node.js I will like to retrieve "wins" in "data" array:
> Requester.request(options, customError)
> .then(response => {
>
> response.data.result = Requester.validateResultNumber(response.data,['data', 'performance','wins'])
> callback(response.status, Requester.success(jobRunID, response))
> })
But I'm getting the :
AdapterError: TypeError: Cannot read property 'wins' of undefined
What path do I need to write to get to my result ?
Found the path with : ["data", "0", "performance", "wins"].