I’m trying to parse out the value of a specific json key. The below when running in qna works fine, shows the value as expected but only if the json file is formatted with multiple lines, see below. Know of how I can get the value when the json file is written to be a 1 liner?
values of keys “objectId” of jsons of files “path_to_file”
works if json is formatted as the below
{
“code”:200,
“objectId”:“vu9U3hXa3q0AAAABACNidWlsdGluOmFsZXJ0aW5nLm1haW50ZW5hbmNlLXdpbmRvdwAGdGVuYW50AAZ0ZW5hbnQAJGJkMThmOGUwLTcxM2MtMzBjZS04Zjg5LTg4MTQ0MTdmNmM1Nr7vVN4V2t6t”
}
1 line json, does not work here
[{“code”:200,“objectId”:“vu9U3hXa3q0AAAABACNidWlsdGluOmFsZXJ0aW5nLm1haW50ZW5hbmNlLXdpbmRvdwAGdGVuYW50AAZ0ZW5hbnQAJGY1ZTJmZDNhLWFlZmQtM2FhNy05Y2U2LTMzNjZlNTc1MTUyML7vVN4V2t6t”}]