I tried this simple JavaScript code:
eval('{"Topics":["toto","tata","titi"]}')
In the Chrome console, for example, this returns
SyntaxError: Unexpected token :
I tried the JSON on JSONLint and it's valid.
Do you see the bug?
You have to write like this
eval('('+stringJson+')' );
to convert an string to Object
Hope I help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With