[dict(reduce(operator.add, map(dict.items, b))) for a, b in itertools.groupby(before, operator.itemgetter("id"))]