var shops = [],
obj={},
numShop = 5;
for (var i = 1; i <= numShop; i++) {
obj.timeOpen = 6 + Math.round(Math.random()*17);
obj.timeClose = 23 - Math.round(Math.random() * (23 - obj.timeOpen));
obj.numBread = Math.round(Math.random()*10);
shops[i] = obj;
}
alert(JSON.stringify(shops[3]));
alert(shops[3].timeClose);