I have spent far too much time trying to troubleshoot something that I think is trivial, but I am not able to retrieve the value of a json object in an HTTP GET response and thus set it as a variable.
I have tried all variants of $context.response.data.quotes[0].quote (I’m not exactly sure where the array actually sits, as I’m obviously not that familiar with json formatting, just know enough to be dangerous) and I just can’t figure out why the value comes up null. Here is the response I get:
{
"success": {
"total": 1
},
"contents": {
"quotes": [
{
"quote": "A man who has no imagination has no wings.",
"length": "42",
"author": "Mohamad Ali",
"tags": [
"imagination",
"inspire"
],
"category": "inspire",
"language": "en",
"date": "2023-01-10",
"permalink": "https://theysaidso.com/quote/mohamad-ali-a-man-who-has-no-imagination-has-no-wings",
"id": "dl_4NxcXFZp1k_zw541sVgeF",
"background": "https://theysaidso.com/img/qod/qod-inspire.jpg",
"title": "Inspiring Quote of the day"
}
]
},
"baseurl": "https://theysaidso.com",
"copyright": {
"year": 2025,
"url": "https://theysaidso.com"
}
}
Any help would be appreciated, thanks!