How does js delete an element from a two-dimensional array

clipboard.png
these two arrays are the same. FImage1 is the picture of base64. This array is passed to the background. You don"t want FImage1. You know that you are using the splice method, but you will not use

.
May.11,2022

although someone has solved it for you, you can't help saying:
this is an one-dimensional array of objects, not a two-dimensional array, and a two-dimensional array is every child element of the array or an array.


    let a = [{a1:'1',a2:'2'},{a3:'3',a4:'4'},]
    for (let item of a) {
        delete item.a1
    }
    console.log(a)

clipboard.png


delete array is splice, but you want to delete object properties

arr.forEach (item= > delete item.FImage1)

Menu