Прежде всего, это вообще не JSON, вы просто используете объекты Javascript.JSON - это текстовый формат для представления объектов, такого понятия, как «объект JSON», не существует.
Вы можете создать конструктор для своих объектов следующим образом:
function Restaurant(location, city_state, phone, distance) {
this.location = location;
this.city_state = city_state;
this.phone = phone;
// here you can add some logic for the distance field, if you like:
this.distance = distance;
}
// create an array restaurants
var restaurants = [];
// add objects to the array
restaurants.push(new Restaurant("123 Road Dr", "MyCity ST", "555-555-5555", 0));
restaurants.push(new Restaurant("123 Road Dr", "MyCity ST", "555-555-5555", 0));
restaurants.push(new Restaurant("123 Road Dr", "MyCity ST", "555-555-5555", 0));