When I try to get the page load time using PerformanceEntry I'm able to get an array of data but how do i get only the value of "domComplete" or "duration" instead of the whole list of data; Here's the code:
const time = performance.getEntriesByType("navigation");
console.log(time[0]);
console.log(time[0]['domComplete']);
when i console log (time[0]), this is what i get:
but when using (time[0]['domComplete']) or (time[0]['duration']), it returns 0