Struggling to format a String by parsing a JSON object. Here's an example of the data I'm working with:
{
"age": 35,
"name": "",
"time": {
"24hr": true,
"12hr": false
}
}
The desired output should be:
age - 35
name
time - 24hr:true, 12hr:false
The problem lies in handling keys with different value types (integer, empty string, and object).
Seeking advice on the best method to achieve this formatting goal.
Currently able to loop through and print out keys, but experiencing issues with displaying values accurately.
Appreciate any help!