javascript - How to grab part of JSON string? -
this.on('success', function(file, responsetext) { var theid = json.stringify(responsetext); alert(theid); window.location.href = ('want put here'); });
the alert giving me:
{"message":"success","fileid":399}
and grab fileid value, in case 399. thank you.
simply
window.location.href = responsetext.fileid;
will since responsetext json
Comments
Post a Comment