Rebuilding mongo documents structure (no map reduce).
Experiments on sorting arrays (mongo based)