Javascript for getting selected filters