You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get-value supports get(obj, 'e[0].f'). See jonschlinkert/get-value#4
But set-value does not create an array given set(obj, 'e[0].f', 'g').
It returns { 'e[0]': { f: 'g' } }.
The text was updated successfully, but these errors were encountered:
Just a note: For me it was unexpected that while set-value supports pushing values to existing arrays, the same path will result in an object being created if no array exists yet at the key. I understand the ambiguity here, but the decision to default to array-creation for index keys as 'lodash.set' felt more intuitive to me.
. See jonschlinkert/get-value#4get-value
supportsget(obj, 'e[0].f')
But
set-value
does not create an array givenset(obj, 'e[0].f', 'g')
.It returns
{ 'e[0]': { f: 'g' } }
.The text was updated successfully, but these errors were encountered: