Q:

Fetch POST from JS and read response from PHP

I'm collecting data in a form and 
calling this js:
fetch('process.php', {
    method: 'POST',
    body: formData,
}).then(response => alert( response ) );

process.php gets called correctly; i perform my ops and then i try to return a confirmation message, or a failure message like this:
 echo json_encode('Upload completato correttamente');

But i can't get the message to show in the alert:
i only get "[object promise]" and playing around with the response i can't seem to read the message. 
Any help? 

A:

There was a problem in the php code i could spot via console. 
It was preventing the following correct code to work correctly:
fetch('process.php', { method: 'POST', body: formData })
  .then(response => response.text() )
  .then(result=>{ alert(result); });

Thank you all

