I have performed this bit of code:
async function getFilteredResults(weather, type, activity) {
const response = await fetch("locations.json", {});
const json = await response.json();
return json.filter(
(obj) => obj.TempRating == weather && obj.Category == activity && obj.Location == type
);
}
And it returns this in the console:
Promise {<pending>}
[[Prototype]]: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: Array(1)0:
{HolidayReference: 9, HotelName: 'Desert Dreams', City: 'Dubai', Continent: 'Asia', Country: 'U.A.E', …}length: 1[[Prototype]]: Array(0)
How do I then access the values of this array in my script? Thanks