I have my json file as below.
{
"components":{
"record1":
[
{
"date":1419038000,
"name":"Vinay",
"status":"false"
},
{
"date":1419034102,
"name":"Ajay",
"status":"true"
}
],
"record2":[
{
"date":1619037000,
"name":"Soumya",
"status":"true"
},
{
"date":1419038000,
"name":"Savio",
"status":"false"
}
]
}
}
This is my js file:
var app=angular.module("myApp",['angular.filter']);
app.controller("Control",function($scope,$http){
$scope.output=[];
$http.get('myData.json').
success(function(data){
$scope.tableData = data.components;
for(var i in Object.keys($scope.tableData)){
for(var j in $scope.tableData[Object.keys($scope.tableData)[i]]){
$scope.output.push($scope.tableData[Object.keys($scope.tableData)[i]][j]);
}
}
console.log($scope.output);
});
});
I want to group the above data from both array of objects only according to date from the given timestamp into a table. I have attached the link for the image below. enter image description here