Trying to figure out how to extract a specific value from a JSON object. Here's the JSON example:
{
"posts":{
"fields":{
"date":"2015/01/24",
"date_end":"2015/01/25",
"time":"23:00 - 05:00"
}
}
}
I need to store the 05:00 part of the time key into a variable. The challenge is that sometimes the time could only have 23:00 without the - 05:00 part. How can I achieve this task?