function getSum(){
var cartSum=0;
var razd='-';
var list='';
for (var key in cartData){
list=toString (cartData[key]);
itemCart=list.split(razd);
cartSum=parseInt(itemCart[3], 10)*parseInt(cartData[key],10);
console.log(list);
}
console.log(list);
console.log(cartSum);
}
var o = {'0-1-211': 1, '1-1-290': 2, '2-1-380': 3};
for (var key in o) {
console.log(key.split('-')[2]);
}
var s = '{0-1-211: 1, 1-1-290: 2, 2-1-380: 3}';
s.split(',').forEach(function(v, k, arr) {
var vv = v.split(':')[0];
console.log(vv.split('-')[2]);
});