Return JSON response and render in client