Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(len(your_dict['History']['foo'])):
- mine = OrderedDict(sorted(your_dict.items(), key=lambda x: x[1]["foo"][i]['Date']))
- "History": {
- "@version": "4.0",
- "foo": [
- {"code": "ID", "Date": "2018-07-09T15:31:09+03:00"},
- {"Date": "2018-07-09T13:46:09+03:00"}
- ],
- "bar": [
- {"code": "ID", "Date": "2018-07-09T09:39:29+03:00"},
- {"code": "ID", "Date": "2018-07-09T09:48:25+03:00"}
- ]
- }
Add Comment
Please, Sign In to add comment