Looking at an object with keys containing arrays of objects that each have a price value. The goal is to find and return the lowest price value. In this scenario, aiming to return the value 8. Wondering if using the reduce method would be the best approach?
Sample Object
const obj =
{
small: [{ price: 10 }, { price: 90 }],
medium: [{ price: 33 }, { price: 8 }],
large: [{ price: 34 }, { price: 44 }]
}
Current Code
Object.entries(obj)