Say below example:
var mystring = `{
name: "hello",
value: 1234
}`
var jsonobj = JSON.parse(mystring)
It will output nothing since the "name" and "value" key without quotes. how can I parse such string to json object? I would not like to add quotes one by one!
You can use eval(), but be careful with eval.