Converting loops in *_all_output to $.map().