I was trying to do this,
var worker_ids = $.parseJSON($(':selected',this).data('workers'));
<option value="77" data-workers="["2287","2137"]">COOL KIDS</option>
Yes, jQuery does attempt to guess at the data type that is stored on the data attribute and converts it when using
.data (also applies for numbers, objects, and so on).
To get the raw attribute value, use
The actual operation is performed by the internal