I am new to angular and need help for the below- I have a json data as follows in my json file:
{
"records":
[
{
"date":1619038000,
"name":"Susan",
"status":"available"
},
{
"date":1419038000,
"name":"Vinay",
"status":"not available"
},
{
"date":1419038000,
"name":"Ajay",
"status":"available"
}
],
"record2":[
{
"date":1419037000,
"name":"Soumya",
"status":"not available"
},
{
"date":1326439320,
"name":"Harsh",
"status":"available"
},
{
"date":1419031000,
"name":"Gopi",
"status":"available"
}
]
}
this is my js file:
angular.module("myApp",[]).controller("Control",function($scope,$http){
$http.get('myData.json').
success(function(data){
$scope.tableData = data.records;
});
});
I want to display data in the table from the json in such a way that all data having the same "date" are grouped together and shown jst one date in the table.Could you pls help me with this.I want it as follows:
date name status 16th april susan available 17th april vinay not available ajay available