I have array I'm getting from calling a .net controller.
I'm getting these values for dates:
/Date(1445256000000)/
and /Date(1445256900000)/
Instead of that I want to be able to get proper date values.
Now since I have array of objects I want to be able to update them in the array before sending them to the view.
This is what I have:
$http({
method: 'GET',
url: '/Driver/GetDriverTrips',
params: { id: id }
}).
success(function (data) {
var startDate= new Date(data[0].StartTime.match(/\d+/)[0] * 1);
alert(myDate);
});
So this conversion works properly but the thing is that I want to loop through all the same objects in the array, do the conversion and then again save it in the array.
Is there any function I can do that?