How can I read the content of a form-data request body variable in the test script?

That was example to differentiate response from approach of get request

This is not valid.

pm.request.json();

Try simple

console.log(request.data);

If your body is part of the key value form-data param of “body”
then

console.log(request.data.body) 

should print that param.
If postman thinks it is a Json and print [object object] then reformat it

var req = JSON.parse(request.data.body); // or stringify
console.log(req);

and in req you have everything via dots.

I don’t know how you managed to send complex json object with form-data (key: value) ?