Skip to content

Instantly share code, notes, and snippets.

@Refefer
Created November 15, 2014 16:24
Show Gist options
  • Save Refefer/f489d9f65bc4837e5956 to your computer and use it in GitHub Desktop.
Save Refefer/f489d9f65bc4837e5956 to your computer and use it in GitHub Desktop.
for {
(k, v) <- tiers
n <- filteredData if (n \ "metricPath").text.contains(v)
} yield k -> bts.filter(n \ "metricPath".text.contains).foldLeft(List[Transaction]()) {
case (agg, bt) => {
val trans = Transaction(bt, k)
trans.metricData = Metric(n)
bt :: agg
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment