话不多说 直接上代码

    var filterData = {a: 1}
    var filterData1 = {b: 2}
    var filterData2 = {}

    for (var key in filterData) {
      filterData2[key] = filterData[key]
    }

    for (var key in filterData1) {
      filterData2[key] = filterData1[key]
    }

    console.log(filterData2)
    // {a: 1, b: 2}
Logo

前往低代码交流专区

更多推荐