Alexandroppolus,
<script>
function toObj(arr) {
let str = arr.join('.');
const obj = {};
for (let i = arr.length; i ; ) {
obj['col_' + i--] = str;
str = str.slice(0,-(arr[i].length + 1));
}
return obj;
}
document.write(`<pre>${JSON.stringify(toObj(['1', '2', '3', '4']), '', 2)}</pre>`)
</script>