Good Day I send an array from javascript that contains an image of a file type input,I need to know how to handle that array in php. the array I get is type:

my php code is
<?php
$data = json_decode($_POST["data"],true);
print_r($data);
my javascript code is
let warranty = {};
warranty.description = document.getElementById("txt_description").value;
warranty.brand = document.getElementById("txt_marca").value;
warranty.serie = document.getElementById("txt_serie").value;
warranty.model = document.getElementById("txt_model").value;
warranty.color = document.getElementById("txt_color").value;
warranty.time_use = document.getElementById("txt_year_use").value;
warranty.status = document.getElementById("dp_status").value;
warranty.location = document.getElementById("dp_location").value;
warranty.price = document.getElementById("txt_price").value;
warranty.img = imgInput.files[0];
warranties.push(warranty);
let datos = new FormData();
datos.append("data",JSON.stringify(warranties));`
i tried
$img = $data[0]['img'];
$file = $_FILES[$img]['tmp_name'];
but it sends me error index not found