maxByArray

Returns the item with the maximum value in an array based on the given key.

Code

Example Value

Output
Name: JohnAge: 30