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
Using Transform to obtain each step's value from another object will encounter a path which cannot be used.
// using the same value to ensure all paths are valid, and should result in the same value
Transform(val, func(p Path, v Value) (Value, error) {
return p.Apply(val)
})
This results in at step 1: key value not number or string when the path is for
I'm not sure how we would intend to handle this. Sets are not currently index-able, so simply skipping the key value not number or string check doesn't work. Should we make all Path values valid for Apply on a correctly shaped Value, have special handling to detect when a set is encountered in the path, or maybe just document this as a potential hazard within Transform and Walk?
The text was updated successfully, but these errors were encountered:
A
Value
containing a set cannot use thepath
argument within aTransform
callback for all paths.Given an object like so:
Using
Transform
to obtain each step's value from another object will encounter a path which cannot be used.This results in
at step 1: key value not number or string
when the path is forI'm not sure how we would intend to handle this. Sets are not currently index-able, so simply skipping the
key value not number or string
check doesn't work. Should we make allPath
values valid forApply
on a correctly shapedValue
, have special handling to detect when a set is encountered in the path, or maybe just document this as a potential hazard withinTransform
andWalk
?The text was updated successfully, but these errors were encountered: