My data looks like this...
[{"max":22.625,"min":18.625,"$id":"1451433600000","$priority":null},
{"max":24.5,"min":18.5,"$id":"1451520000000","$priority":null},
{"max":24.125,"min":18.625,"$id":"1451606400000","$priority":null},
{"max":21.5,"min":18.375,"$id":"1451692800000","$priority":null},
{"max":85,"min":18.375,"$id":"1451779200000","$priority":null}]
Here we can see 5 sets of data, and I need to be able to split them into 3 arrays.
The first array needs to have all the Max values.
22.625, 24.5, 24.125, 21.5, 85
The second needs to have all the Min values
18.625, 18.5, 18.625, 18.375, 18.375
And the last needs to have all the id's
1451433600000, 1451520000000, 1451606400000, 1451692800000, 1451779200000
Keeping them in the same order is important and if there is multiple duplicate values then I need to keep them.
Im getting the data with angular fire like this...
var ref_day = new Firebase("https://mydb.firebaseio.com/1day");
$scope.day_log = $firebaseArray(ref_day);
angular.forEach($scope.day_log, function(value, key){
// I NEED SOME HELP HERE
});