I need to collect each property values in an array of objects int to separate property arrays, is there any simple way to do it. Either underscore and angularjs utilities are fine.
For example, I have an array of objects as,
$scope.expNumArray = [];
$scope.itemHrArray = [];
$scope.highReArray = [];
$scope.rowdata = [{
"expNum": "678",
"itemHr": "",
"highRe": "C"
}, {
"expNum": "978",
"itemHr": "3",
"highRe": ""
}];
Now for this I need to have the following:
$scope.expNumArray = ["678", "978"];
$scope.itemHrArray = ["", "3"];
$scope.highReArray = ["C",""];