I have the following array, and I want to be able to delete all the "phonenumber" keys and of course its value from the JSON objects. Only the keys "phonenumber" an not the whole object. How can I do that?
[
{
"role": "admin",
"id": "59df4ef2d8d39",
"email": "[email protected]",
"name": "A",
"lastname": "A",
"password": "1",
"image": "img_webshop\/userimage-59dfb91515810.png"
},
{
"role": "user",
"id": "59df4f1b070e6",
"phonenumber": "12345678",
"name": "B",
"lastname": "B",
"password": "2",
"image": "img_webshop\/userimage-59e37de69475b.png"
},
{
"role": "user",
"id": "59dfc0cb07985",
"email": "[email protected]",
"name": "C",
"lastname": "C",
"password": "3",
"image": "img_webshop\/userimage-59dfc0cb06c5f.png"
},
{
"role": "user",
"id": "59dfc22f26f78",
"phonenumber": "87654321",
"name": "D",
"lastname": "D",
"password": "4",
"image": "img_webshop\/userimage-59dfc22f2638d.png"
},
{
"role": "user",
"id": "59dfc460b261e",
"email": "[email protected]",
"name": "E",
"lastname": "E",
"password": "5",
"image": "img_webshop\/userimage-59dfc460af866.png"
}
]