expr icon indicating copy to clipboard operation
expr copied to clipboard

Support selecting into arrays

Open narthollis opened this issue 4 years ago • 2 comments

It would be useful to be able to select into arrays, eg. people[].name or people[*].name to get an array of the contents all the name properties of objects in the people array.

I am currently working on a custom validator for yup that will need to read the the a name property from an object array to validate some other fields in the form. I have ideas on how to work around this, but it would be useful to be be able to simple to do this using a Ref

narthollis avatar Jan 28 '21 04:01 narthollis

hey there, I think that'd be beyond the scope of this library, I'm not necessarily against having yup ref's function like that, but we'd probably need higher confidence that it would be a useful behavior generally.

jquense avatar Jan 28 '21 13:01 jquense

Would it be better for me to open this feature request in yup proper then?

I opened it here after looking at how References worked and seeing they basically just delegated here

narthollis avatar Jan 28 '21 22:01 narthollis