Skip to content

Instantly share code, notes, and snippets.

@edoloughlin
Created January 16, 2011 16:21
Show Gist options
  • Select an option

  • Save edoloughlin/781912 to your computer and use it in GitHub Desktop.

Select an option

Save edoloughlin/781912 to your computer and use it in GitHub Desktop.
How do I add a map to an array of maps?
mymap = []
# neither of these works:
mymap += { a: 1, b : 2 }
mymap = mymap + { a: 1, b : 2 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment