All, I've got the following code:
onDone: function (e, data) {
var result = jQuery.parseJSON(data.result);
var uploadType = result.upload_type;
var filename = result.name;
var insert_id = result.insert_id;
}
When I run this I get the following error from IE:
Message: 'upload_type' is null or not an object
When I do a console.log(data.result) in Chrome I get the following data:
[{
"name": "1_3266_671641333369_14800358_42187036_5237378_n.jpg",
"size": 35535,
"type": "image\/jpeg",
"url": "\/web\/upload\/1_3266_671641333369_14800358_42187036_5237378_n.jpg",
"thumbnail_url": "\/web\/upload\/thumbnails\/1_3266_671641333369_14800358_42187036_5237378_n.jpg",
"delete_url": "\/web\/upload.php?file=1_3266_671641333369_14800358_42187036_5237378_n.jpg",
"delete_type": "DELETE",
"upload_type": "video_montage",
"insert_id": "288"
}]
I'm trying to see why I'm getting the error message in IE8 but I can't see what is being parsed. When I did do an alert like this:
var result = jQuery.parseJSON(data.result);
alert(result)
I was getting null but no idea why.
Any help is greatly appreciated on how to read it or why my results of the parsed JSON are null even though there is data in my returned string!
Thanks!