Check if object member exists in nested object

后端 未结 8 976
花落未央
花落未央 2020-11-27 05:00

Is there a simpler way than using ___ in object to check the existence of each level of an object to check the existence of a single member?

More conci

8条回答
  •  孤城傲影
    2020-11-27 05:26

    Check out lodash-deep’s deepHas https://github.com/marklagendijk/lodash-deep#_deephascollection-propertypath

    And this too https://github.com/danielstjules/hoops

提交回复
热议问题