How to access all the keys of a Zod Object after .refine is applied? #435
Answered
by
maneetgoyal
maneetgoyal
asked this question in
Q&A
-
Hi all, I am migrating from v1 to v3 (beta) and running into some issues. Here how my Zod object look like:
|
Beta Was this translation helpful? Give feedback.
Answered by
maneetgoyal
May 14, 2021
Replies: 1 comment 2 replies
-
I need the array of keys to remove all unwanted keys from the object (without really having to validate it). From v3 onwards, Zod is removing keys by default when we parse, so as a workaround I am just parsing the object when I need to "trim" it. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
maneetgoyal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need the array of keys to remove all unwanted keys from the object (without really having to validate it). From v3 onwards, Zod is removing keys by default when we parse, so as a workaround I am just parsing the object when I need to "trim" it.