From df38eadc4cd0e825138866bf15106395190c6350 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 8 Sep 2021 17:14:14 -0400 Subject: [PATCH] Sort list of cards by their codes --- strange_eons_to_arkhamdb.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/strange_eons_to_arkhamdb.js b/strange_eons_to_arkhamdb.js index 2f1f64f..ab7bda1 100644 --- a/strange_eons_to_arkhamdb.js +++ b/strange_eons_to_arkhamdb.js @@ -176,4 +176,8 @@ while (member_iter.hasNext()) { var card_data = build_card(component); cards.push(card_data); } + +cards.sort(function (a, b) { + return parseInt(a.code) - parseInt(b.code); +}); println(JSON.stringify(cards, null, 4));