将对象转换为键值对

let  list = Object.keys(item.configuration.message.inputval).map(key => {
    
    
                    return  {
    
     name: key, value: item.configuration.message.inputval[key] }
                })
//打印构造的键值
console.log(list)

效果演示:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_45932157/article/details/125980951