Zend certified PHP/Magento developer

Update custom attributes to product using rest

$data = [
    "product" => [
        "sku"=> $productsku,
        // "attribute_set_id"=> 4,
        //"attribute_set_id" => $mage_attr_set_id,
        // "entity_type_id" => $entity_type_id,
        "visibility" => 2,
        // "custom_attributes" => $subArray
        "custom_attributes" => [
            [
                "attribute_code" => "selling_unit_of_measure",
                "value" => "each"
            ]
        ]
    ]
];