Function hasNestedProperty

Check if an object has a nested property

  • Parameters

    • obj: Record<string, any>

      Object to check

    • propertyPath: string

      Path of property. Syntax: 'prop1.prop2.prop3...'

    Returns boolean

    • If the nested property exists