Yomguithereal / baobab

JavaScript & TypeScript persistent and optionally immutable data tree with cursors.
MIT License
3.15k stars 117 forks source link

.parent() feature #447

Closed azimot closed 8 years ago

azimot commented 8 years ago

after selecting a path sometimes need to access to parent for example : tree.select('palette', 'flower','herbal').set('newkey','newvalue').parent()
or .parent('flower') [one of fathers that is exist on path] to doing another things

Yomguithereal commented 8 years ago

Hello @azimot. The .up method actually does that (at least your first example, not the latter with further selection).

azimot commented 8 years ago

Thanks