Jizzy,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<div class="editable" im="001">1</div>
<div class="editable" im="002">2</div>
<div class="editable" im="003">3</div>
<div class="editable" im="004">4</div>
<div class="editable" im="005">5</div>
<script>
var s = {};
[].forEach.call( document.querySelectorAll('.editable'), function(el) {
s[el.getAttribute('im')]= el.innerHTML
});
alert(JSON.stringify(s))
</script>
</body>
</html>