1. var obj = {
    2. top250:["你好","他的"],
    3. comingSoon:["防抖111","及时111"],
    4. theaters:["放大镜222","防静电222"]
    5. }
    6. //获取对象中属性的值
    7. var arr =[]
    8. for(var key in obj){
    9. arr.push(...obj[key])
    10. var res =[];
    11. var reg = /\d/g;
    12. //对数组中的每一项值的过滤
    13. arr.forEach(name=>{
    14. var name = name.replace(reg,"");
    15. console.log(name)
    16. res.push({
    17. name
    18. })
    19. })
    20. console.log(res)
    21. }
    22. console.log(arr)