var index = parseInt(document.getElementById('table2').value) - 1;
var listQwe = [qwe1, qwe2, qwe3, qwe4];
var value = listQwe[index][0];
sum += value;
var arr = [
[0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0],
[0,1,1,1,1,1,1,1,1,1,0,0],
[0,1,0,0,0,0,0,0,0,1,0,0],
[0,1,1,0,1,0,0,0,0,1,0,0],
[0,0,0,0,1,0,0,0,0,1,0,0],
[0,0,1,0,1,0,0,0,0,1,0,0],
[0,0,1,0,1,1,1,1,1,1,0,0],
[0,0,1,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0],
];
console.log(arr.length)
// 12
<li data-id="123">
<div class="product-name">Товар 3</div>
<span class="quantity">2 × <span class="amount">1.440.000 руб</span></span>
</li>
$('[data-id="%id%"]'.replace("%id%", 123))
$("[id='строка1']").each(function (){
$(this).attr("id", "строка2");
});
$(".строка1").each(function (){
$(this).removeCLass("строка1").addClass("строка2");
});