Sort lists by ID

This commit is contained in:
Muntashir Al-Islam
2022-08-09 12:31:04 +06:00
parent 21d2efb5a4
commit 216b39e196
7 changed files with 7921 additions and 7918 deletions

View File

@@ -30,6 +30,9 @@ foreach ($list as $item) {
# Save to dir
foreach ($new_list as $list_type => $list) {
usort($list, function ($o1, $o2) {
return $o1['id'] <=> $o2['id'];
});
file_put_contents(__DIR__ . '/' . $list_type . '.json', json_encode($list, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
}