How can I use perl to process JSON, so that instead of one line several lines are output as a structure?
my $json_string = '{"status":"success","answer":{"status":"success","result":{"full_fqdn":"example.com","result":"blablabla","php_version":"8.0","cgi":"disabled"}}}';
I want to get a result like the one on this output:
"status": "success",
"answer": {
"status": "success",
"result": {
"full_fqdn": "example.com",
"result": "blablabla",
"php_version": "8.0",
"cgi": "disabled"
}
}
I don't quite understand the proper use of JSON to convert the output this way. Thank you!
jq -r .