let prices = [
{ price: 51, amount: 434 },
{ price: 50, amount: '178 штук' },
{ price: 52, amount: '1,5 килограмма' },
{ price: 23, amount: ' 2.7 метра ' },
{ price: 97, amount: 'семь единиц' }
];
var i;
for (i = 0; i < prices.length; ++i) {
prices[2].amount.replace(',', '.');
console.log(parseFloat(prices[i].amount));
}