I'm making a new data entry through AJAX. It consists of the model data and some HABTM data as well. I return all this data as a json object from my controller and I would like to add a CakePHP view element containing this data to the current view, somewhat what twitter does when you post a tweet.
How can I manage to get the json object, append the element and set the data from the json object to said element? I have a good idea about how to append the element but the data setting I'm not clear about.