Getting all the object values
Getting all the values of an object using Object.values()
The Object.values()
method gives you an array with all the values linked to an object’s properties.
Usecase
Object.values()
is particularly valuable in scenarios where you need to search for specific values within an object
Consider a library of books. You want to find all the books by a specific author.