JSFiddle - React, Tailwind, and code Playground

by Denis Ineshin

JavaScript

var result = '{"somejson", "value"}';
result += '<div>Some html</div>';

console.log(result);

var sl = result.indexOf("<");

var json = result.slice(0, sl);
var html = result.slice(sl);

console.log(json);
console.log(html);