Creating A Valid Server Response From Javascript/angular
My JSON { 'RECORDS': [ { 'Id': 23040035705987, 'arriveddate': '2015/04/24', 'expirationDate': null, 'replacedDate': null
Solution 1:
You could use two nested forEach loops.
angular.forEach(obj.processDate, function(processValue, processIndex,date) {
angular.forEach(obj2.RECORDS, function (recordValue, recordIndex,records) {
if (processValue === recordValue["processDate"]) {
if (!obj["Id"][processIndex]) {
obj["Id"][processIndex]=[];
}
obj["Id"][processIndex].push(recordValue["Id"]);
});
});
}
Post a Comment for "Creating A Valid Server Response From Javascript/angular"