I am somewhat new to Python...
I have an array of dicts that I got by reading a file containing JSON messages, i.e. using something like this:
import json
ws = []
with open('messages.txt', 'r') as f:
for line in f:
data = json.loads(line)
ws.append(data)
Each JSON message has, among other things, three fields: "date" and "type" and "location". I need to sort the array first by date, then by type within each block of identical dates, then by location within each block of identical types. How can I do that? Thx much!