Replies: 1 comment 1 reply
-
Can you move this into a issue? Basically what you saying is, that you only want keys with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why do I get
key2: undefined
in the output ? What's the best way to ignore them.My use case is that upon successful parsing I want to loop over array values via
Object.values(catalog).map(item => objectKeys(item)).flat()
which breaks with errorCannot convert undefined or null to object
This used to work as intended with zod schema.
Unless my input is
const input = {key1: {x: ["hello", "world"]}, key2: undefined}
the output shouldn't contain undefined.What's valibot's way of stripping away undefined keys ?
Beta Was this translation helpful? Give feedback.
All reactions