Code:
<html>
<head>
<script>
obj = {
"_id": "3ad893cb4cf1560add7b4caffd4b6126",
"_rev": "1-1f0ce165e1d210319cf6e9f9c6ff654f",
"name": "couchdb_1.couchdb",
"type": "couchdb",
"ts": 1445785730,
"couchdb": {
"auth_cache_misses": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"database_writes": { "current": 1955, "sum": 1955, "mean": 0.004, "stddev": 0.061, "min": 0, "max": 1 },
"open_databases": { "current": 47, "sum": 47, "mean": 0, "stddev": 0.03, "min": 0, "max": 14 },
"auth_cache_hits": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"request_time": { "current": 934798.325, "sum": 934798.325, "mean": 247.236, "stddev": 9323.841, "min": 0, "max": 415733 },
"database_reads": { "current": 688315, "sum": 688315, "mean": 1.316, "stddev": 69.941, "min": 0, "max": 5497 },
"open_os_files": { "current": 101, "sum": 101, "mean": 0, "stddev": 0.061, "min": -1, "max": 28 }
},
"httpd_request_methods": {
"PUT": { "current": 18, "sum": 18, "mean": 0, "stddev": 0.009, "min": 0, "max": 1 },
"GET": { "current": 11172, "sum": 11172, "mean": 0.021, "stddev": 0.747, "min": 0, "max": 66 },
"COPY": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"DELETE": { "current": 2, "sum": 2, "mean": 0, "stddev": 0.003, "min": 0, "max": 1 },
"POST": { "current": 1948, "sum": 1948, "mean": 0.004, "stddev": 0.061, "min": 0, "max": 1 },
"HEAD": { "current": 1, "sum": 1, "mean": 0, "stddev": 0.004, "min": 0, "max": 1 }
},
"httpd_status_codes": {
"200": { "current": 9073, "sum": 9073, "mean": 0.017, "stddev": 0.589, "min": 0, "max": 53 },
"201": { "current": 1949, "sum": 1949, "mean": 0.004, "stddev": 0.061, "min": 0, "max": 1},
"202": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"301": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"304": { "current": 81, "sum": 81, "mean": 0, "stddev": 0.026, "min": 0, "max": 3 },
"400": { "current": 2, "sum": 2, "mean": 0, "stddev": 0.005, "min": 0, "max": 1 },
"401": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"403": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"404": { "current": 1585, "sum": 1585, "mean": 0.007, "stddev": 0.375, "min": 0, "max": 33 },
"405": { "current": null, "sum": null, "mean": null, "stddev": null, "min": null, "max": null },
"409": { "current": 4, "sum": 4, "mean": 0, "stddev": 0.008, "min": 0, "max": 1 },
"412": { "current": 2, "sum": 2, "mean": 0, "stddev": 0.006, "min": 0, "max": 1 },
"500": { "current": 1, "sum": 1, "mean": 0, "stddev": 0.004, "min": 0, "max": 1 }
},
"httpd": {
"clients_requesting_changes": { "current": 0, "sum": 0, "mean": 0, "stddev": 0.033, "min": -2, "max": 2 },
"temporary_view_reads": { "current": 4, "sum": 4, "mean": 0, "stddev": 0.008, "min": 0, "max": 1 },
"requests": { "current": 12186, "sum": 12186, "mean": 0.023, "stddev": 0.751, "min": 0, "max": 66 },
"bulk_requests": { "current": 1920, "sum": 1920, "mean": 0.004, "stddev": 0.06, "min": 0, "max": 1 },
"view_reads": { "current": 206, "sum": 206, "mean": 0.003, "stddev": 0.062, "min": 0, "max": 2 }
}
};
for (i in obj) {
if ((typeof obj[i]) === "object") {
for (j in obj[i]) {
if ((typeof obj[i][j]) === "object") {
document.write(obj.type + "," + i + "=" + j + ",");
var c=0;
for (k in obj[i][j]) {
document.write(((c++==0) ? "" : ",") + k + "=" + ((! obj[i][j][k]) ? 0 : obj[i][j][k]));
}
}
document.write("<br>");
}
}
}
</script>
</head>
</html>