You may have to loop though the response like in the following example.
const response = pm.response.json();
console.log(response);
response.forEach(object => {
pm.test(`location for id${object.id} is a string`, () => {
pm.expect(object.location).to.be.a("string");
});
});
This is using a concept called Template Literals and in particular string interpolation to customize the test case name, otherwise you just get the same test case name for each object (which makes it hard to troubleshoot when it fails).