I want to parse data on client side, I am keeping data in input field after serialization.
JavaScriptSerializer objJavaScriptSerializer = new JavaScriptSerializer();
string jsonString = objJavaScriptSerializer.Serialize(_statusVal);
jsonFmtStatusValue.Value = jsonString;
On Client Side When I saw the data string which is stored in input field it's coming like this
[
{
"nodeContentId": "1234_5678",
"statusTypeId": "5678",
"statusName": "Submitted by Customer",
"dateTime": "/Date(1352745000000)/",
"forceEmail": "on",
"user": {
"userId": "0",
"userName": "admin"
},
"note": {
"typeName": null,
"dataValue": null
}
},
{
"nodeContentId": "1234_5678",
"statusTypeId": "5678",
"statusName": "Checked, Printed, Folded & Re-checked",
"dateTime": "/Date(1353402060000)/",
"forceEmail": "on",
"user": {
"userId": "0",
"userName": "admin"
},
"note": {
"typeName": null,
"dataValue": null
}
}
]
Code Which I tried to parse Json data is :
var JsonData = $("#<%=jsonFmtStatusValue.ClientID %>").val();
obj = jQuery.parseJSON(JsonData)
alert(obj.nodeContentId);
Things I get in alert box: Undefine
Not able to figure out what should i use for parsing.