As a couple of people have referred to above, converting the object to a JSON string may be the way to go with json_encode and then all of the object contents should be available within the receiving scripts.
As a couple of people have referred to above, converting the object to a JSON string may be the way to go with json_encode and then all of the object contents should be available within the receiving scripts.
A model / collection is automagically converted into json when printed.
The .done() and .fail() are the jQuery Deferred events that will be called when the AJAX request is completed or failed. These are very useful when making AJAX calls.