Sort a list of dicts by a dictionary key

PHOTO EMBED

Mon Nov 30 2020 15:22:05 GMT+0000 (Coordinated Universal Time)

Saved by @alex.balaboshko #python

return sorted(list_of_dicts, key=lambda e: e['dict_key'], reverse=True)
content_copyCOPY