Yes, it is possible, however, first to note that your JSON structure is invalid, this does not make sense 'id': 'rt6hj7'{
so you should start by using a valid JSON, eg
{
"rt6hj7": {
"nome": "Miguel"
},
"rt10hg9": {
"nome": "Sagas"
}
}
Now assuming that this structure is in file.json, we can add keys with something like:
// pega o conteúdo do file.json e transforma em um php array
$data = json_decode(file_get_contents('file.json'), true);
// adiciona "José" sob a id "8dhus8763"
$data['8dhus8763'] = ['nome' => 'José'];
// salva seu novo JSON
file_put_contents(json_encode($data));
The idea is basic: get the contents of JSON - > transforms the JSON string into a PHP array - > adds the object with "name": "Joseph" in the array, with the id "8dhus8763" - > transforms your PHP array into a JSON string - > saves the JSON string in the original file.