Is there a easier way to check an deep object's inner properties?
Unanswered
Virginia's Warbler posted this in #help-forum
Virginia's WarblerOP
This is more of a plain JS question. But lets say if I have deeply nested obejcts like xxx.yyy.zzz.aaa
I can do a series of checks to see: if xxx have yyy && if xxx.yyy have zzz && if xxx.yyy.zzz have aaa
But is there an easy way?
I can do a series of checks to see: if xxx have yyy && if xxx.yyy have zzz && if xxx.yyy.zzz have aaa
But is there an easy way?
7 Replies
@Virginia's Warbler This is more of a plain JS question. But lets say if I have deeply nested obejcts like xxx.yyy.zzz.aaa
I can do a series of checks to see: if xxx have yyy && if xxx.yyy have zzz && if xxx.yyy.zzz have aaa
But is there an easy way?
Why do you want to check tho? I can recommend something based on that
xxx?.yyy?.zzz?.aaa
Virginia's WarblerOP
Thank you. Those 2 are helpful
@Anay-208 | Ping in replies Why do you want to check tho? I can recommend something based on that
Virginia's WarblerOP
Whatever you want to recommend, please recommend
I just want a syntacally easy way to check deeply nested objs
@Virginia's Warbler Whatever you want to recommend, please recommend
if its too nested, then you can use something like zod to safe parse it