Parse JSON response in curl_response_data

Status
Not open for further replies.

Sunny Gosain

New Member
Oct 27, 2020
11
0
1
53
Beginner's question: In my dial plan I use curl to call an API. Now as I understand if the response (i.e. {curl_response_data}) is a string I can simply set <variable>=${curl_response_data}. However the response from the API is a JSON {"key1:"val1", "key2":"val2"}. How can I parse/obtain the values of key1 and key2 from {curl_response_data}?
 
Status
Not open for further replies.