Category: typescript

How to return and get the sum of object properties based on given filters?

I have the following object. var data = [ {“Name”:”ABC”,”Dept”:”First”,”FY”:”2016″,”Quarter”:”1″,”Month”:”April”,”Total”:”100″}, {“Name”:”ABC”,”Dept”:”Second”,”FY”:”2017″,”Quarter”:”2″,”Month”:”May”,”Total”:”200″}, {“Name”:”ABC”,”Dept”:”First”,”FY”:”2016″,”Quarter”:”1″,”Month”:”June”,”Total”:”150″}, {“Name”:”DEF”,”Dept”:”First”,”FY”:”2016″,”Quarter”:”1″,”Month”:”April”,”Total”:”200″}, {“Name”:”DEF”,”Dept”:”Second”,”FY”:”2017″,”Quarter”:”2″,”Month”:”May”,”Total”:”100″}, {“Name”:”DEF”,”Dept”:”First”,”FY”:”2016″,”Quarter”:”1″,”Month”:”June”,”Total”:”500″} ] I want to filter

Continue reading