📌  相关文章
📜  将对象转换为数组 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:59.799000             🧑  作者: Mango

代码示例6
const rooms = {r1: "Room 1", r2: "Room 2", r3: "Room 3"};

const arrayResult = Object.keys(rooms).map(room => {
    return {id: room, name: rooms[room]} 
});