Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. for i in range(len(your_dict['History']['foo'])):
  2. mine = OrderedDict(sorted(your_dict.items(), key=lambda x: x[1]["foo"][i]['Date']))
  3.  
  4. "History": {
  5. "@version": "4.0",
  6. "foo": [
  7. {"code": "ID", "Date": "2018-07-09T15:31:09+03:00"},
  8. {"Date": "2018-07-09T13:46:09+03:00"}
  9. ],
  10. "bar": [
  11. {"code": "ID", "Date": "2018-07-09T09:39:29+03:00"},
  12. {"code": "ID", "Date": "2018-07-09T09:48:25+03:00"}
  13. ]
  14. }
Add Comment
Please, Sign In to add comment