Use Rails logic with JSON data
<p>This may seem a pretty stupid question but I'm out of ideas at the moment and appreciate suggestions.</p>

<p>I have created a quiz interface that should change the question when <strong>NEXT</strong> button is clicked. The next question is loaded as JSON via AJAX call. Now the question contains HTML and I need to use <strong>Rails sanitize helper</strong> to filter tags.</p>

<p>I am not sure how I would use <strong>sanitize</strong> method on <strike>JSON data</strike> data acquired via AJAX call.</p>

<p>Please guide me.</p>

<p><strong>EDIT:</strong>
The stress was not on JSON data. It was an honest mistake. The issue was the inability to use Rails logic on the data returned by AJAX call.</p>