for(var i=0;i<results.length;i++) {
// Create the object to save the data.
b=results[i].price-results[i].price*results[i].sale/100;
a=b*results[i].quantity;
var smart = {
'id': results[i].id,
'prod': results[i].prod,
'name': results[i].name,
'photo': results[i].photo,
'sale': results[i].sale,
'price': results[i].price,
'tsale': b,
'vsego':a,
'quantity': results[i].quantity,
};
allprice=+ smart.vsego;
smartphone.push(smart);
}