var?arr?=?eval('('+str+')');
var?newArray?=?[];
for?(var?i?=?0?;?i?<?arr.length?;?i++)?{
var?obj?=?{};
obj.text?=?arr[i];
obj.value?=?arr[i];
newArray.push(obj);
}
alert(newArray);
或者
var?str?=?'["同意","不同意"]';
var?arr?=?JSON.parse(str);
var?newArray?=?[];
for?(var?i?=?0?;?i?<?arr.length?;?i++)?{
var?obj?=?{};
obj.text?=?arr[i];
obj.value?=?arr[i];
newArray.push(obj);
}
alert(newArray);