Skip to content

Commit

Permalink
Reverse sort output
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjohncarlson committed Apr 11, 2024
1 parent b2ef4b7 commit bd9a605
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def generate_json_output(generator_list):
}
generator_output.append(item_dict)

# Sort generator_output by last_modified date in reverse chronological order
generator_output.sort(key=lambda x: x['last_modified'], reverse=True)

# Create dict item with title of bucket name with values
output_dict[generator_name] = generator_output

Expand Down

0 comments on commit bd9a605

Please sign in to comment.