Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 348 Bytes

React JSX遍历obj.md

File metadata and controls

25 lines (21 loc) · 348 Bytes
layout title date tags comments
post
react JSX遍历obj
2016/5/3 20:46:25
react
true

使用Object.keys方法获取对象所有key,再通过Key获取具体对象的值;

var list = {
    a: "a",
    b: "b",
    c: "c"
};
  
Object.keys(list).map((name, index) => {
    return({
    	list[name]
    });
})