我有一个字符串:var textData = $('#textare').val();
其中textData
内容为 - > changed by arunesh,changed by avi
我想将其转换为 - > ["changed by arunesh","changed by avi"]
,就像一个json数组。
答案 0 :(得分:2)
// it will make it an array.
var arr = $('#textare').val().split(',');