```
let arraytoAdd = [{
        "Id": "FIRSTID",
        "uid": "RX74X-20210715-20756",
        "type": "fabricant",
        "statut": "published",
        "application_ref": "RX74X",
        "version_application": "1.1.0",
        "creation_date": "2021-07-15T14:42:41.465Z",
        "titulaire": "Player1",
        "ref_id": "462378462",
        "description": "300x300 - 20 - Cross Black",
        "famille": {
            "nom": "REST D+",
            "parent": "RX"
        }
    },
    {
        "Id": "SecondId",
        "uid": "RX74X-20210715-20758",
        "type": "fabricant",
        "statut": "published",
        "application_ref": "RX74X",
        "version_application": "1.1.0",
        "creation_date": null,
        "titulaire": "Player1",
        "ref_id": "162367462",
        "description": "300x300 - 20 - Blue",
        "famille": {
            "nom": "REST F+",
            "parent": "RX"
        }
    }
]

let arrayProducts = [{
        "nom": "REST D+",
        "parent": "RX",
        "produits": [{
            "uid": "RX74X-20210720-75584",
            "type": "fabricant",
            "parent_uid": null,
            "version_application": "1.1.0",
            "creation_date": "2021-07-20T14:34:04.49Z",
            "titulaire": "Player1",
            "ref_id": "ref-18-taieb",
            "famille": {
                "nom": "REST D+",
                "parent": "RX"
            }
        }],
        "version_schema": null
    },
    {
        "nom": "REST F+",
        "parent": "RX",
        "produits": [{
            "uid": "RX74X-20210720-33547",
            "type": "fabricant",
            "parent_uid": null,
            "version_application": "1.1.0",
            "creation_date": "2021-07-20T14:46:37.649Z",
            "titulaire": "Player1",
            "ref_id": "ref19-taieb",
            "gamme": "SUPERGRES T_20",
            "serie": "STOCKHOLM",
            "description": null,
            "famille": {
                "nom": "REST F+",
                "parent": "RX"
            }
        }],
        "version_schema": null
    }
]

function add(array, bigTable) {
     let res
    for (item of array) {
         res = bigTable.find(x => x.nom === item.famille.nom);
            if (res) {
            res.produits.push(item)
        }
        else {
            console.log('Doesnt exist')
        }

        } return res
    }

    console.log(add(arraytoAdd, arrayProducts))

```

At the moment it 's not doing the intended result, I'm not doing the push properly.
The desired result is to check for the `nom` from the object on the second table must equal the `famille.nom` from the object if it does, add the object from the first table inside `produits` of the object on the second array.
So res will look like this

```
let finalResult = [{
    "nom": "REST D+",
    "parent": "RX",
    "produits": [{
            "uid": "RX74X-20210720-75584",
            "type": "fabricant",
            "parent_uid": null,
            "version_application": "1.1.0",
            "creation_date": "2021-07-20T14:34:04.49Z",
            "titulaire": "Player1",
            "ref_id": "ref-18-taieb",
            "famille": {
                "nom": "REST D+",
                "parent": "RX"
            }
        },
        {
            "uid": "RX74X-20210715-20756",
            "type": "fabricant",
            "statut": "published",
            "application_ref": "RX74X",
            "version_application": "1.1.0",
            "creation_date": "2021-07-15T14:42:41.465Z",
            "titulaire": "Player1",
            "ref_id": "462378462",
            "description": "300x300 - 20 - Cross Black",
            "famille": {
                "nom": "REST D+",
                "parent": "RX"
            }
        },
    ],
    "version_schema": null
}, {
    "nom": "REST F+",
    "parent": "RX",
    "produits": [{
            "uid": "RX74X-20210720-33547",
            "type": "fabricant",
            "parent_uid": null,
            "version_application": "1.1.0",
            "creation_date": "2021-07-20T14:46:37.649Z",
            "titulaire": "Player1",
            "ref_id": "ref19-taieb",
            "gamme": "SUPERGRES T_20",
            "serie": "STOCKHOLM",
            "description": null,
            "famille": {
                "nom": "REST F+",
                "parent": "RX"
            }
        },
        {
            "uid": "RX74X-20210715-20758",
            "type": "fabricant",
            "statut": "published",
            "application_ref": "RX74X",
            "version_application": "1.1.0",
            "creation_date": null,
            "titulaire": "Player1",
            "ref_id": "162367462",
            "description": "300x300 - 20 - Blue",
            "famille": {
                "nom": "REST F+",
                "parent": "RX"
            }
        }
    ],
    "version_schema": null
}]

```