which method converts a json string to a javascript object code example
Example 1: js string to json
var obj = JSON.parse("{no:'u',my:'sql'}");//returnes {no:'u',my:'sql'}
Example 2: json.stringify file object return {}
// get File Object
var fileObject = getFile();
// reCreate new Object and set File Data into it
var newObject = {
'lastModified' : fileObject.lastModified,
'lastModifiedDate' : fileObject.lastModifiedDate,
'name' : fileObject.name,
'size' : fileObject.size,
'type' : fileObject.type
};
// then use JSON.stringify on new object
JSON.stringify(newObject);