我正在與JavaScript數據結構戰鬥。我需要創建一個映射,其中的鍵是一個字符串,並且該值是一個包含兩個long的數組。Map with String key where value是Javascript中long對的數組嗎?
例如,像:
var x = myMap["SomeString"];
var firstLong = x[0][0];
var secondLong = x[0][1];
// do something with first and second long
firstLong = x[1][0];
secondLong = x[1][1];
// do something with first and second long
etc..
如何能正確我在Javascript中實現這一目標?
什麼你的意思是「長」嗎? – VisioN 2013-03-25 12:33:10
可以包含時間戳的東西(自時代以來的毫秒數) – JVerstry 2013-03-25 12:33:52
@JVerstry http://en.wikipedia.org/wiki/JSON有更多信息 – rab 2013-03-25 12:45:54