Skip to content

Instantly share code, notes, and snippets.

@aayushdutt
Last active July 30, 2022 17:42
Show Gist options
  • Save aayushdutt/10bd992a177a540085c17b8635c6cd7a to your computer and use it in GitHub Desktop.
Save aayushdutt/10bd992a177a540085c17b8635c6cd7a to your computer and use it in GitHub Desktop.
Capture dividend investments details from cleartax to an object to make it easier to find duplicates
const list = document.querySelector("#anyOtherDividendNarrationList > div > div.narration-items")
const rows = list.children
const getRowData = (row) => {
return {name: row.children[0].children[0].value, amount: row.children[1].children[0].value, date: row.children[2].children[0].value}
}
const res = []
Array.from(rows).forEach(row => res.push(getRowData(row)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment