var data = {
    "108": [{
        "N": 1,
        "I": "1.108",
        "W": "models_updated",
        "F": function(e, t, a, i, o) {
            for (var r, n = '<div id="' + o++ + '.108" refresh=models_updated class="red dropdown"><select dota-model=$form.model class=dm108><option value="" selected="">' + (s("Any Model") || "") + "</option>", l = e.models, d = -1, c = l.length; ++d < c;) r = l[d], n += '<option value="' + r._id + '">' + (r.model || "") + "</option>";
            return n += "</select></div>", n = n || '<div id="' + o++ + '.108" style=display:none></div>'
        }
    }],
    "109": [{
        "N": 1,
        "I": "1.109",
        "W": "models",
        "F": function(e, t, a, i, o) {
            var r = "";
            if (e.models) {
                r += '<tr id="' + o++ + '.109" refresh=models><td class=label-text>' + (s("Models") || "") + '</td><td colspan=3><div class=relative><div class="red dropdown"><select dota-model=$form.model class=dm109><option value="" selected="">' + (s("Any Model") || "") + "</option>";
                for (var n, l = e.models || [], d = -1, c = l.length; ++d < c;) n = l[d], r += '<option value="' + n._id + '">' + (n.model || "") + "</option>";
                r += "</select></div></div></td></tr>"
            }
            return r = r || '<tr id="' + o++ + '.109" style=display:none></tr>'
        }
    }]
}

function serialize(x){
	if (typeof x === 'string'){
		return '"' + x.replace(/"/g, '\\"') + '"';
	} else if(x === null || typeof x === 'number' || typeof x === 'boolean'){
		return x;
	} else if(Array.isArray(x)){
		var ret = '[';
		for(var i = 0; i < x.length; i++) {
			ret += (i ? ',' : '') + serialize(x[i]);
		}
		ret += ']';
		return ret;
	} else if (typeof x === 'object') {
		var ret = '{'
		var c = 0
		for (var i in x) {
			if (i in x) {
				ret += (c ? ',' : '') + (/^[\w$]+$/.test(i) ? i : '"' + i + '"') + ':' + serialize(x[i])
				c = 1
			}
		}
		ret += '}'
		return ret
	} else if (typeof x === 'function') {
		return x.toString()//.replace(/\n\s*/g, '')
	}
}


console.log(data)
var res = serialize(data)
console.log(res)
var zzz = eval('(' + res + ')')
console.log(zzz)
