Skip to content

Instantly share code, notes, and snippets.

@mathewmeconry
Created May 10, 2019 07:39
Show Gist options
  • Save mathewmeconry/71ad75da2616f8de69f40fc09e30f4bc to your computer and use it in GitHub Desktop.
Save mathewmeconry/71ad75da2616f8de69f40fc09e30f4bc to your computer and use it in GitHub Desktop.
Baiers solution
let carddata = [{ scryfallid: '7f3423d7-cb81-47bf-b9a6-a279ba6cedf4' }]
let exportData = [{ scryfallid: 'be8ec9e1-2c8e-496d-9111-4d453b75b578', artnrmagicmonk: '15220000-war-099-en' },{ scryfallid: '7f3423d7-cb81-47bf-b9a6-a279ba6cedf4', artnrmagicmonk: '12345688-war-099-en' }]
let artNrMagicMonk = []
for (let card of carddata) {
let exp = exportData.find(el => el.scryfallid === card.scryfallid )
if (exp) {
artNrMagicMonk.push(exp.artnrmagicmonk)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment