Day 25 – Merging Two Hashes

Being able to pick information out of a hash is nice but what about when you need to update the hash or combine/merge it with another?

ruleset a60x519 {
  meta {
    name "hash-put-test"
    description <<
    author "Mike Grace"
    logging on

  rule testing {
    select when pageview ".*"
    pre {
      first = {
      second = {

      combined = first.put(second);
      emit <|
  • 14-21 generic hashes with dummy data
  • 23 merge the two hashes together using the put operator – returns a new hash
  • 26-30 output the hashes to the console to review the results

App run on with bookmarklet

Get the bookmarklet to try it out yourself!

Gratuitous day 25 Grace face

This entry was posted in Kynetx. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s