mongo script for sum up array group by