["57300","730","17300","17330","17340","70","220","320","380","420","340","130","50","280","360","550","43110","44340","400","620","440","20","72850"]
Is an array of strings being passed back into a javascript function which proceeds to do work on it to break it up into an array of strings (using the split function with "," as a delimiter).
The problem here, is I need to convert each of those after that into an integer. Sounds easy okay.
So I proceed to do a:
$.each(data, function(i, item)
On it. If I console log the item, I can see it being "57300", "730" etc etc. Which is fine. But if I try to do this:
var number = parseInt(item, 10);
And console log what number is... its NaN (should it not be 57300, 730, etc without the quotes?). Is some hidden character messing with me causing parseInt to break?
["\"57300\"","\"730\"", ...]rather than["57300","730", ...]splitto break it up, then it wasn't an array of strings, it was just one big string. It sounds like you maybe should be usingJSON.Parse.