I am completely newbie in JavaScripts and sorry for my english if it so bad. I have json file looking like that:
{
"posts":[
{
"id":2236659,
"updated_at":"2020-05-02T19:58:43.763-04:00",
"file":{
"width":933,
"height":1200,
"ext":"png",
"size":1325351,
"md5":"d1f501df73f7d1daec07a86657baae01"
}
},
{
"id":2227726,
"created_at":"2020-04-23T08:06:37.907-04:00",
"file":{
"width":933,
"height":1200,
"ext":"png",
"size":1182791,
"md5":"112cadaaaa89841e8bb7633ba272a409"
}
},
{
"id":2218681,
"created_at":"2020-04-16T07:56:56.849-04:00",
"file":{
"width":933,
"height":1200,
"ext":"png",
"size":1241188,
"md5":"c3c13b8e5c72913fa7db03ffc8b6f3c4"
}
}
]
}
The problem that the order of posts is incorrect. It sorted by ascending of id. Real json file contain more than 3 post. I have order list. How I can sort it with custom order that I typed. For example: I want get md5 with this order: 2227726,2218681,2236659