It is probably a simple solution, but I can not seem to get it working :/ I want to create a new "response" from results collected trough json/api call.
jsonResponse = [
{"_id":"1","desc":"test desc","title":"Title 1"},
{"_id":"2","title":"Title 2","desc":"desc 2"}
];
I need to create a new array from this that looks like this;
var newResponse = [
{ "heading" : "Title 1", "summary" : "test desc"},
{ "heading" : "Title 2", "summary" : "desc 2"}
];
Stripping _id and changing "key". How can I go about doing it?