modify to use JsHelper#object() instead of json_encode()