If the string contains a valid JSON array (for example, in your example), you can use JSON.parse, for example:
instrumentsString = '["guitar","bass","drums","keyboard"]';
instrumentsArray = JSON.parse(instrumentsString);
Please note that in all browsers there is no function JSON.parse, so you may need to enable the implementation. For example, jQuery comes with one, and you can also use Douglas Crockfords json2.
source
share