Given the following data, how would I iterate through it copying `parent.parentName` from the child (`driver`) into the parent (`businessArea`) and from `type` to `product`?

I am normally alright at figuring out data manipulations like this but I am coming up blank for ideas because I cannot `map` or `forEach` over the data (since it is an object). I am also trying to keep it functional if possible.

```
{
    "businessArea": [
        {
            "id": 1,
            "displayOrder": 10,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        },
        {
            "id": 2,
            "displayOrder": 20,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        },
        {
            "id": 3,
            "displayOrder": 30,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        }
    ],
    "driver": [
        {
            "id": 1,
            "displayOrder": 10,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 1,
                "parentName": "businessArea"
            }
        },
        {
            "id": 2,
            "displayOrder": 20,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 2,
                "parentName": "businessArea"
            }
        },
        {
            "id": 3,
            "displayOrder": 30,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 2,
                "parentName": "businessArea"
            }
        }
    ],
    "product": [
        {
            "id": 1,
            "displayOrder": 10,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        },
        {
            "id": 2,
            "displayOrder": 20,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        },
        {
            "id": 3,
            "displayOrder": 30,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false
        }
    ],
    "type": [
        {
            "id": 1,
            "displayOrder": 10,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 1,
                "parentName": "product"
            }
        },
        {
            "id": 2,
            "displayOrder": 20,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 1,
                "parentName": "product"
            }
        },
        {
            "id": 3,
            "displayOrder": 30,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "parent": {
                "id": 2,
                "parentName": "product"
            }
        }
    ]
}

```

**Desired outcome example:**

Each parent element would get a new element `childName`, which would point to the correct child as denoted by `parentName` in the child.

```
{
    "businessArea": [
        {
            "id": 1,
            "displayOrder": 10,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "childName": "driver"  // copied
        },
        {
            "id": 2,
            "displayOrder": 20,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "childName": "driver"  // copied
        },
        {
            "id": 3,
            "displayOrder": 30,
            "code": null,
            "description": "Lorem ipsum dolor sit amet",
            "isObsolete": false,
            "childName": "driver"  // copied
        }
    ],

```