I am using PHP, MySQL, and javascript. I use php to connect to my database to select appointments. I then echo them in a script tag as arrays of object literals (JSON objects):
appointment[$apptid] = {"time":"8:00", "date":"2012-02-10", "description":"testAppt"};
...
I chose to do it this way over writing an appointment "class" in case I add or remove appointment fields, however I can't figure out for the life of me how to create functions that will apply to this array of objects. Is there anyway to declare these as appointment objects and then write prototype functions without losing the properties?