Closed echan00 closed 1 month ago
This is indeed a false positive, but I understand the confusion.
When you select either a key or a value, they both have the same path. You can distinguish them only by looking at whether the type
is key
or value
. The value itself is not part of the path. Try for example with the Lodash function get
what happens:
import { get } from 'lodash-es'
const json = {
'string': 'Hello World'
}
console.log(get(json, ['string'])) // will print "hello World"
Makes sense. The json is accessible so agree the key is really good enough in this case
Submitting a separate issue relating to
OnSelect
.I'm not that experienced, so maybe this is a false positive. But I see that KeySelection and ValueSelection are both returning the value of the Key.