deepin target, and get value or keys from target
it is only a alias of query(obj, keys).value
const obj = { a: { b: [1, 2] } }
query(obj, 'a.b[0]') // => 1
query the result from target by keys
if it's true
, this funciton will create object or array when necessary
const obj = { a: { b: [1, 2] } }
query(obj, 'a.b[0]') // => { target: [1, 2], key: 0, value: 1 }
or with createTarget param
const obj = { }
query(obj, 'a.b[0]', true) => { target: [], key: 0, value: undefined }
deepin target, and set value of keys from target
const obj = { a: { b: [1, 2] } }
query(obj, 'a.b[0]', 3)
obj.a.b[0] === 3 // => true
Generated using TypeDoc
means a iterable object key, includes string and number, but symbol