Skip to content

Instantly share code, notes, and snippets.

@natew
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natew/d8f7f03cd4b3acdb3c82 to your computer and use it in GitHub Desktop.
Save natew/d8f7f03cd4b3acdb3c82 to your computer and use it in GitHub Desktop.
immutable-js object tree
var data = Immutable.fromJS({
items: [{
name: "one",
kids: [{
name: "one-one",
kids: [] //...
}]
}]
});
data.get('items').map(function(i){console.log(i)})
// => Map { name: "one", kids: Vector [ Map { name: "one-one", kids: Vector [] } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment