Skip to content

Instantly share code, notes, and snippets.

@ktaragorn
Last active January 21, 2016 08:24
Show Gist options
  • Save ktaragorn/229cf6aabea0ee0b56e8 to your computer and use it in GitHub Desktop.
Save ktaragorn/229cf6aabea0ee0b56e8 to your computer and use it in GitHub Desktop.
var rows = $("table.paginated tbody tr").filter(function(i, row){ return $(row).find("td:nth-child(5)").text() == "3-Rm";});
var rents = $.map(rows, function(row) {return parseInt($(row).find("td:nth-child(6)").text())})
var sum = rents.reduce(function(a, b) { return a + b; });
// Average
sum/rents.length
// Max
Math.max(...rents)
// Min
Math.min(...rents)
@ktaragorn
Copy link
Author

Search for records and tehn run this code in developer console. Change 3-Rm as per your requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment