You could use jquery's parseJSON() function.
var str = '["5703","5704"]';
var parsed = $.parseJSON( str );
The parsed object now contains the array: ["5703","5704"]
Reference -
jQuery.parseJSON( json )"Takes a well-formed JSON string and returns the resulting JavaScript object."
Lix
- 48.2k
- 12
- 107
- 134