how can i select this object using "."

I am hitting an external api, and to my greatest surprise, the response is something like this
{
"status": "success",
"data": {
"CAD-USD": 74
}
}
{
"status": "success",
"data": {
"CAD-USD": 74
}
}
How can i access "CAD-USD " ?? Something like this
response.data.cad-usd
response.data.cad-usd
1 Reply
thescotsmav
thescotsmav14mo ago
response.data['CAD-USD'] probably?