var prices = [
{name: 'Bed', price: 900},
{name: 'Table', price: 400}
], _prices = {};
prices.forEach(function(el) {
_prices[el.name] = el;
});
prices = _prices;
alert( prices.Table.price );
var prices = {
bed: 900,
table: 200
};
alert(prices.table);