我從服務器接收JSON類似如下:轉換多維JSON多維JavaScript數組
{"sent":{"Executive":1},"received":{"Executive":1},"viewed":{"Executive":1}}
如何將這種結構轉換爲JavaScript多維數組?
我想是這樣的:
var sent = [["Executive", 1]];
var received = [["Executive", 1]];
var viewed = [["Executive", 1]];
我想,這已經讓我未定義的結果。 –