allow filter and fields to be JSON strings or JS objects