JSFiddle - React, Tailwind, and code Playground
HTML
<table id="my_table"><tbody></tbody></table>
JavaScript
var json = [[0, "some str"], [1, "some <str>"], [0, "some str &&& <a>not a link</a>"]], tagsToReplace = {
'&': '&',
'<': '<',
'>': '>'
}, result = "", current;
function replaceTag(tag) {
return tagsToReplace[tag] || tag;
}
function textify(str) {
return str.replace(/[&<>]/g, replaceTag);
};
for (var i = 0, maxlength = json.length; i < maxlength; i++ ) {
current = textify(json[i][1]);
result += "<tr class='my_result'>"
+ "<td>"+current+"</td></tr>"
}
$('#my_table tbody').html(result);