Added AJAX to get object info from database and return it as an array