如何在Javascript中实现此数组

时间:2014-04-20 04:50:56

标签: javascript arrays

Array ( [254] => OnJob [251] => Verified [250] => Verified [249] => OnJob [248] => OnJob [247] => OnJob [244] => OnJob )

我有这个数组,现在我想得到各个数组键的每个值。如何在javascript中执行此操作?

1 个答案:

答案 0 :(得分:1)

创建一个对象

my_object={254: 'OnJob',251: 'Verified', 250: 'Verified',249: 'OnJob'};
my_object[251]; //return "Verified"