How do I sort on a specific value in a dictionary in python flask within a template

Solution 1
return render_tamplate('your_template.html', db_get_show_application_overview=db_get_show_application_overview)
return render_tamplate('your_template.html', db_get_show_application_overview=sorted(db_get_show_application_overview, key=your_key_function))
sorted(db_get_show_application_overview, key=lambda item: item['sao_line_num'])
Solution 2
db_get_show_application_overview = [
{
    'sao_application': {'name': 'appname1'},
    'sao_line_num': '1',
    'sao_primary_app_name': 'A Application',
    'sao_physical_server_name': 'server1'
},
{
    'sao_application': {'name': 'appname2'},
    'sao_line_num': '2',
    'sao_primary_app_name': 'C Application',
    'sao_physical_server_name': 'server1'
},
{
    'sao_application': {'name': 'appname3'},
    'sao_line_num': '3',
    'sao_primary_app_name': 'B Application',
    'sao_physical_server_name': 'server0'
}]

print(sorted(db_get_show_application_overview, key = lambda x: x['sao_physical_server_name']))