JSFiddle - React, Tailwind, and code Playground

HTML

<p id="result">

</p>

JavaScript

var obj =  {"count":1,"items":[{"rating":"teens","videos":[{"width":1280,"link":"http://192.168.195.86:1081/playback/play/99e2399e-368b","dar_image":1.7777777778,"language":"eng","duration":5166,"type":"main","id":"99e2399e-368b","dar_frame":1.7777777778,"height":720}],"trial":false,"metadata_language":"eng","year":2003,"images":[{"link":"http://192.168.195.86:1081/image/1675610d-e57e.jpg","type":"poster","id":"1675610d-e57e","orientation":"landscape"}],"id":"d0e9d382-e2d4","has_download_policy":true,"title":"Ice Bound","section":"hollywood","crew":[{"role":"director","name":"Roger Spottiswoode"}],"type":"movie","website_url":"http://192.168.195.86:1081/eng/movie/pkdaci6s-ice-bound","description":"Testin'g «ταБЬℓσ»: 1<{2 & 4+1}>3, now 20% off!@#$%^&*(). Another Testing String ","link":"http://192.168.195.86:1081/movie/d0e9d382-e2d4","slug":"pkdaci6s","categories":[{"link":"http://192.168.195.86:1081/category/ca8a9dce-514d","id":"ca8a9dce-514d","title":"Drama"}],"metadata_direction":"ltr","audio_languages":["eng"],"cast":[{"name":"Susan Sarandon"},{"name":"Aidan Devine"},{"name":"Cynthia Mace"}]}],"remaining":1};


escapeObject(obj);
var escaped = JSON.stringify(obj);
document.getElementById("result").innerHTML = escaped;


function escapeObject(theObject) {
    var result = null;
    if(theObject instanceof Array) {
        for(var i = 0; i < theObject.length; i++) {
            result = escapeObject(theObject[i]);
            if (result) {
                break;
            }   
        }
    }
    else
    {        
        for(var prop in theObject) {    
            if (typeof theObject[prop] == typeof "") {
              var escValue = encodeURIComponent(theObject[prop]);
              theObject[prop] = escValue;  
            }
            if(theObject[prop] instanceof Object || theObject[prop] instanceof Array) {
                result = escapeObject(theObject[prop]);
                if (result) {
                    break;
                }
            }
...