Fix the sweeps grouping code so that it is correct for all return types.
Fix the sweeps grouping code so that it is correct for all return types.

We don't want it group for json, but we do for html and js. The previous
version got this wrong for js.

aina1205/SysMO-DB-seek,aina1205/nmtrypi-seek,aina1205/nmtrypi-seek,SynthSys/seek,stuzart/seek,aina1205/nmtrypi-seek,stuzart/seek,aina1205/SysMO-DB-seek,HITS-SDBV/nmtrypi-seek,kjgarza/frame_experiment,Virtual-Liver-Network/seek,HITS-SDBV/seek,HITS-SDBV/nmtrypi-seek,Virtual-Liver-Network/seek,SynthSys/seek,HITS-SDBV/nmtrypi-seek,kjgarza/frame_experiment,SynthSys/seek,Virtual-Liver-Network/seek,stuzart/seek,HITS-SDBV/seek,BioVeL/seek,BioVeL/seek,kjgarza/frame_experiment,aina1205/SysMO-DB-seek,kjgarza/frame_experiment,aina1205/nmtrypi-seek,Virtual-Liver-Network/seek,HITS-SDBV/nmtrypi-seek,BioVeL/seek,BioVeL/seek,HITS-SDBV/seek,SynthSys/seek,HITS-SDBV/seek