JSON aggregation in pipelines