Object
Set a value on an object using a path key
Opposite of get, dynamically set a nested value into an object using a key path. Does not modify the given initial object.
import { set } from 'radash'
set({}, 'name', 'ra')
// => { name: 'ra' }
set({}, 'cards[0].value', 2)
// => { cards: [{ value: 2 }] }