I have an object that I receive from an api, and each object's length are similarly long.
now, it does have a key fname
and lname
and I want it to become just name
. I don't want to manually create an empty array and push a new one there just to change fname
and lname
into name
.
Is there anyway I can achieve this without looping through the object and manually pushing it?