I can get the results of the chainlink path with req.add("path", "chainlink")
However, I want to return the price value, of "chainlink", "USD". The output json has two paths, how do I reach the second path to get the price value?
function requestLINKPrice()
public
onlyOwner
{
Chainlink.Request memory req = buildChainlinkRequest(JOB, address(this), this.fulfill.selector);
req.add("get", "https://api.coingecko.com/api/v3/simple/price?ids=chainlink&vs_currencies=usd");
req.add("path", "chainlinkUSD");
req.addInt("times", 100);
sendChainlinkRequestTo(ORACLE, req, ORACLE_PAYMENT);
}
Here is the JSON response of the API
{
chainlink: {
usd: 3.78
}
}