Можно как-то так
var allValues = {
1: {
price: [2150,2200,2350,1600,1450,1500,1650,900],
itogo: [1450,1500,1650,900,2150,2200,2350,1600]
},
2: {
price: [1800,1850,2000,1250,1150,1200,1350,600],
itogo: [2300,2400,2700,1200,3600,3700,4000,2500]
},
3: {
price: [1617,1667,1817,1100,1017,1067,1217,467],
itogo: [3050,3200,3650,1400,4850,5000,5450,3300]
},
4: {
price: [1525,1575,1725,1025,950,1000,1150,400],
itogo: [3800,4000,4600,1600,6100,6300,6900,4100]
},
5: {
price: [1470,1520,1670,980,910,960,1110,360],
itogo: [4550,4800,5550,1800,7350,7600,8350,4900]
}
}
function setValues(allValues, i) {
var currency = ' руб.'
var valuesGroup = allValues[i]
for (var n in valuesGroup.price) {
$('#price' + n).html(valuesGroup.price[n] + currency)
}
for (var n in valuesGroup.itogo) {
$('#itogo' + n).html(valuesGroup.itogo[n] + currency)
}
}
setValues(allValues, 2)