I am trying to run a script in node.js by passing a json string as a command line argument and then parsing this json string.
node ab.js [{"url": "http://example"}]
Now in my script i do the following:-
var str=process.argv[2]
However when i try to print the variable str i am getting following output and not the whole json string.
[{url
Can some help me on this? I wanted the entire string to be stored in str variable.