Sort by Property

Sort an array of objects by a specific property.

Code

General
sorted(arr, key=lambda x: x[key])

Parameters

Array of objects

Property to sort by

Server

More Python Snippets