my $decoded = decode_json($json); my $aref = $decoded->{"observations"}; foreach my $element (@$aref){ $final .= $element->{"op_path"}.","; } print $final; #### { "generation_date": "", "static_info": "", "justification_files": [], "test_procedure_files": [ "" ], "observations": [ { "op_path": "Lib::Execution", "c_op_name": "Lib", "mono_info": "", "status": [ { "kind": "I", "path": "_L7=", "info": "%(MinorFrameCnt)%", "stat": "O" }, { "kind": "I", "path": "_L2=", "info": "%(Offset)%", "stat": "O" }, { "kind": "I", "path": "_L1=", "info": "%(Period)%", "stat": "O" }, { "kind": "I", "path": "_L6=-1", "info": "%(_L3)% = _L8", "stat": "O" }, { "kind": "I", "path": "_L6=-2", "info": "_L3 = %(_L8)%", "stat": "O" } ] }