Updated code to return data grouped by keyFilter

Reviewed By Matt