标签:from class OLE let trie bsp col bar ons
//数组转换成对象 const arr = [[‘foo‘, 1],[‘bar‘, 2]] const obj = Object.fromEntries(arr) console.log(obj.bar) //找出key的长度为3的值 const obj = { abc: 1, def: 2, ghewe: 3 } let res = Object.fromEntries( Object.entries(obj).filter(([key, val]) => key.length === 3) ) console.log(res)
标签:from class OLE let trie bsp col bar ons
原文地址:https://www.cnblogs.com/qjb2404/p/12232278.html