如何转换此Object的格式?

时间:2011-05-21 19:03:51

标签: javascript javascript-objects

OBJECT
    description ["Good stuff", "Bad stuff"]
    months_left ["12", "24"]

OBJECT
    description[0][0] = "Good stuff"
    months_left[0][1] = "12"
    description[1][0] = "Bad stuff"
    months_left[1][1] = "24"

谢谢你!

1 个答案:

答案 0 :(得分:0)

...一样

for(var i = 0; i < description.length; i++) {
    description[i] = [description[i]];
}