jtjt1010,
var prices = [{
name: 'Bed',
price: 900
}, {
name: 'Table',
price: 400
}]
for (var i = 0; i < prices.length; i++) {
if (prices[i].name == 'Table') alert(prices[i].price)
}
for (var i = 0; i < prices.length; i++) {
prices[prices[i].name] = {};
prices[prices[i].name]['price'] = prices[i].price
}
alert(prices.Table.price)