My Array is called MainArray
MainArray=[{
{First Name: "First Name"},
{Last Name: "Contact"},
{Last Name: "Contact"}
]
I am trying to trim the key-value pair from this array like this:
if (key == 'First Name')
{
delete MainArray[key] /// But this method is not working
}
The desired final outcome should be:
ResultArray=[{
{Last Name: "Contact"},
{Last Name: "Contact"}
]