How can I sort the arr by created_at?
arr = [{1:{"created_at":3}}, {2:{"created_at":5}}, {3:{"created_at":2}}]
Desired result:
arr = [{3:{"created_at":2}}, {1:{"created_at":3}}, {2:{"created_at":5}}]
The problem is that the first key is different for each object and I want to access the object assigned to that key and then the .created_at property on that to sort, can someone help`?