Skip to content

Instantly share code, notes, and snippets.

@dhyegocalota
Created January 3, 2018 20:36
Show Gist options
  • Select an option

  • Save dhyegocalota/c3487b82d68f31e56b841e6beee7050d to your computer and use it in GitHub Desktop.

Select an option

Save dhyegocalota/c3487b82d68f31e56b841e6beee7050d to your computer and use it in GitHub Desktop.

Revisions

  1. dhyegocalota created this gist Jan 3, 2018.
    1 change: 1 addition & 0 deletions febraban_banks.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    console.log(JSON.stringify(Object.values(Array.from(document.querySelectorAll('table:nth-child(2) tbody tr')).filter((x, i) => i > 2).map(x => ({ code: x.querySelector('td:nth-child(1)').innerText.trim(), name: x.querySelector('td:nth-child(2)').innerText.trim() })).filter(x => x.code.length).reduce((acc, x) => { acc[x.code] = x; return acc }, {})), null, 2));