I have a API that I'm testing and I'm expecting responseBody to be a Json object (starts with "{"). However it could be that due to an unexpected event the response could be returned as an array (starts with "[").
How can I determine the type (array or object) of responseBody using Postman tests?
So far the best I have is: When expecting an object (not an array)
var bodyJson = pm.response.json();
tests["Response should not be an array"] = !(bodyJson instanceof Array);