for (let key in dataPars) { let input; let {type} = input = document.getElementById(key); if(type === "checkbox") input.checked = dataPars[key] > 0; else input.value = dataPars[key]; }