I receive a string in the format given below (with double quotes around it):
"'{ "param" : "value"}'"
How can I convert this string into json object so that I could use it as
alert(obj.param)
Thank you
Edit
As I mentioned in above the string has double quotes around it. Here is an example of how I get this string
CSHTML
@{
var prop = "{ \"param\" : \"value\"}";
<a data-type="@prop"></a>
}
and in JS I have this
var obj = anchor.data('type');
I want to be able to use obj.param, how do I achieve this?
Thanks