created DataAggregation.js - to handle data aggregation assuming a flat structure passed