JS:
function fetchNotifications(){
$.ajax({
url: "getgroupednotification.json",
type: "GET",
crossDomain: true,
success:function(response){
$.each(response,function(idx, val){
//console.log(response);
//console.log(val);
$.each(val.Notifications, function(idx_, val_){
if(val.Source == 'CIRIS'){
var totalNotifications = val.Notifications.length;
if(val_.ReadFlag != 1){
}
}
});
});
});
I am trying to retrieve the count of notifications where ReadFlag is equal to 0. In this example scenario, I am checking for Source being CIRIS.
You can access my JSON data from this link: