I know a similar question has been asked here: Finding the max value of an attribute in an array of objects, but with that method there is no way to return the entire object containing the maximum.
I have this array of objects:
[
{Prop: "something", value: 2},
{Prop: "something_else", value: 5},
{Prop: "bla", value: 3}
]
I want to find the maximum value over the property "value" and then I want to return the entire object
{Prop: "something_else", value: 5}
What is the easiest way to do that in javascript?