101 icon indicating copy to clipboard operation
101 copied to clipboard

Array keypaths

Open rstacruz opened this issue 8 years ago • 1 comments

It'd be nice to skip the string.split('.') and just allow array keypaths:

put(obj, ['user', 'name'], 'tjmenha') 

What do you think?

rstacruz avatar Aug 19 '16 14:08 rstacruz

All the keypath stuff is powered by keypather. It would be fine adding the functionality there, but adding this functionality in 101 complicates partial method arg checking..

Will have to think about this. I've seen this request before w/ keypather, but I always thought it was trivial to just use join('.'): put(obj, ['user', 'name'].join('.'), 'tjmehta')

tjmehta avatar Aug 25 '16 06:08 tjmehta