Hello,
I'm trying to convert a json var into a javascript object but when I write (in my file .html) the line relative to 'eval' the page doen't work and don't display anything:
<html>
<body>
<script type="text/javascript">
var myJSON = {"count":26,.......};
var myObject = eval("("+ myJSON+")"); //problem here
document.writeln(myJSON.value.title);
</script>
</body>
</html>
<html>
<body>
<script type="text/javascript">
var myJSON = {"count":26,.......};
var myObject = eval("("+ myJSON+")"); //problem here
document.writeln(myJSON.value.title);
</script>
</body>
</html>
To copy to clipboard, switch view to plain text mode
If I comment the 'eval' line, writeln print properly; otherwise it doesn't print!
Why eval doens't work, please?
Thanks.
Bookmarks