In JS (it is node/js but actually is a general JS question)
I have a data object which is a result of JSON coming from the server.
I want to manipulate the data before passing it to the view.
How can I do that? (I can make additional objects that contain the rest of the data but it feels wrong and un-natural)
var response = JSON.parse(moment_respose_content );
if (response.success)
{
var data = response.data[0];
//add additional fields to data
}