【发布时间】:2010-08-21 03:46:22
【问题描述】:
我有一个接收字符串参数的函数,我需要将其转换为数组。例如:
var param = "['Presidente', '', ''], ['Gerente de Operaciones', 'Presidente', ''], ['Gerente de Ventas', 'Presidente', '']";
function myFunc(data){
// DoSomethingHere
}
myFunc(param);
我需要将数据转换为数组,在这种情况下它将有 3 个位置。我试过做 Split() 但没走多远。
【问题讨论】:
标签: javascript arrays multidimensional-array