• Returns first found value at given list of paths of given object. Will return and stop at undefined if found. If nothing is found then default value (required to pass) will be returned.

    See

    get - for base usage example with single path only

    Example

    getMultiple(obj, 5, "details.error.message", ["error", "message"], "errorMessage")
    // will look for obj.details.error.message - if path does not exist
    // will look for obj.error.message - if not defined
    // will look for obj.errorMessage - if not defined
    // will return 5

    Returns

    • found value or default value

    Parameters

    • source: Source

      source object to search in

    • defaultValue: unknown

      default value to return if nothing is found

    • Rest ...paths: (string | string[])[]

      paths defined as dot-separated properties names or array of properties name

    Returns unknown

Generated using TypeDoc