I am currently dealing with data retrieved from an API where some keys have values formatted in a specific way. The values of these keys are structured as arrays, but the array itself contains one lengthy string. Here is an example:
"key_one": [
"[\"Some Value One\",\"Some Value Two\",\"Some Value Three\"]"
],
"key_two": [
"[\"Some Value Four\",\"Some Value Five\"]"
],
My goal is to transform this format:
["[\"Some Value One\",\"Some Value Two\",\"Some Value Three\"]"]
into this desired output:
["Some Value One","Some Value Two","Some Value Three"]
Initially, I considered using Regex for this task, but my limited experience with Regex has hindered progress. My attempt at implementing a basic for loop that searched for quotation marks and processed characters was unsuccessful and overly complex.
If anyone can provide me with a more efficient solution, I would greatly appreciate it...