function saveToLS(dt){
localStorage.setItem('data', JSON.stringify(dt))
}
function loadFromLS(){
return JSON.parse(localStorage.getItem('data'))
}
var data = [
{
"Acmeindustries": {
"domain": [
"com Commercial organization",
"net Network",
],
"ipaddress": [
"12.12.162.0",
"165.13.21.170"
]
}
},
{
"Unitedindustrial": {
"domain": [
"net Commercial ",
"net Network",
"org Organization"
],
"ipaddress": [
"12.12.162.0",
"165.12.21.179"
]
}
}
]
function saveToLS(data);
loadFromLS().forEach(acc => {
var name = Object.keys(acc)[0]
var domains = acc[name].domain
var addresses = acc[name].ipaddress
console.log(name)
console.log(domains)
console.log(addresses)
})