📜  javascript映射对象数组获取键 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:12.431000             🧑  作者: Mango

代码示例1
var foo = {
  'alpha': 'puffin',
  'beta': 'beagle'
};

var keys = Object.keys(foo);
console.log(keys) // ['alpha', 'beta'] 
// (or maybe some other order, keys are unordered).