Hi,
I would like to count a value of json objects. For instance:
var requests = [
{
"id": "1",
"firstname": "John",
"lastname": "Doe",
"allowance": "56",
"employeeid": "1",
"type": "Ilness",
"hours":"8"
},
{
"id": "2",
"firstname": "John",
"lastname": "Doe",
"allowance": "56",
"employeeid": "1",
"type": "Holiday",
"hours":"8"
}
{
"id": "3",
"firstname": "John",
"lastname": "Doe",
"allowance": "56",
"employeeid": "1",
"type": "Holiday",
"hours":"8"
}
];
The result I need:
Illness: 8 hours
Holiday 16 hours
Thanks in advance,
Jan