你好,我有一個輸出到這個透過JSON.stringifyJavaScript對象地圖(扁平化)
{"0":["test1","ttttt","","","","","","","",""],"1":["test2","ghjgjhgjh","","","","","","","",""]}
我想有這樣的輸出對象。
[["test1","ttttt","","","","","","","",""],["test2","ghjgjhgjh","","","","","","","",""]]
我試圖此以除去「0」和「1」通過使用.MAP
var itemjson = $.map(cleanedGridData, function (n) {
return n;
});
然而這給出的(見下文)的輸出已平坦化至遠。
["test1", "ttttt", "", "", "", "", "", "", "", "", "test2", "ghjgjhgjh", "", "", "", "", "", "", "", ""]
我不喜歡,不需要jQuery的解決方案:) – Sebivor