JSFiddle - React, Tailwind, and code Playground
by robbyn
JavaScript
function makeDom(obj) {
var $dl = $("<dl/>");
$.each(obj, function(name, val) {
$("<dt>").text(name).appendTo($dl);
var $dd = $("<dd>");
if(val && typeof val === "object") {
$dd.append(makeDom(val));
} else {
$dd.text(val);
}
$dd.appendTo($dl);
});
return $dl;
}
var obj = {
"DNS": {
"Server": "MYSERVER01",
"IP": "XXX.XXX.XXX.XXX"
},
"TST": {
"SubKeyCount": 0,
"View": 0,
"Handle": {
"IsInvalid": false,
"IsClosed": false
},
"ValueCount": 309,
"Name": "HKEY_LOCAL_MACHINE\\Software\\TST",
"ComputerName": "MYSERVER01",
"Hive": -2147483646,
"Path": "Software\\TST"
},
"ServiceNow": null,
"InstalledSoftware": [
{
"Status": true,
"Software": [
"Symantec NetBackup 7.5",
"Symantec NetBackup Client",
],
"Version": [
"0000",
"7.5",
]
},
{
"Status": true,
"Software": "Symantec Endpoint Protection",
"Version": "12"
},
{
"Status": true,
"Software": "System Center 2012",
"Version": "7.0"
}
],
"AutoDuplex": {
"Description": "NIC...