JSON Data Processing: Parse, Filter, Aggregate

Problem

Given nested JSON records, parse them, filter by conditions, and aggregate the results (e.g. sum, group-by).

Input / Output

  • Input: a collection of nested JSON records and a filter/aggregation spec.
  • Output: the aggregated result, e.g. total amount per category for records matching the filter.

Constraints

  • Records may have missing or malformed fields — handle them defensively rather than crashing.

Example

records -> total amount per category where status='active'
added …
LeaderboardSalaryAccount