Янковиц,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<div class="boxes">
<div class="box"><span class="one">1</span><span class="one">10</span></div>
<div class="box"><span class="two">2</span><span class="one">20</span></div>
</div>
<script>
var obj = [].reduce.call(document.querySelectorAll(".boxes"), function(obj, boxes, i) {
obj[i] = [].reduce.call(boxes.querySelectorAll(".box"), function(arr, box) {
var span = box.querySelectorAll("span");
arr.push({
first: +span[0].textContent,
second: +span[1].textContent
});
return arr;
}, []);
return obj;
}, {});
obj = JSON.stringify(obj);
alert(obj);
</script>
</body>
</html>