JSFiddle - React, Tailwind, and code Playground
JavaScript
<script >
var results = JSON.parse(encode_utf8( "{{ myposts|escapejs }}" ));
console.log(results);
// Gives me the exact result i need ["a", "b", "c"]
function encode_utf8(s) {
return unescape(encodeURIComponent(s));
}
</script>