Select

public struct Select: Fn

Select traverses into the argument passed to from and returns the resulting value. If the path does not exist, it results in an error.

Reference.

  • Declaration

    Swift

    public init(path: Expr..., from object: Expr, default: Expr? = nil)

    Parameters

    path

    Determines a location within object.

    object

    Value in which path should be selected.

    default

    Return this value instead of an error if the path does not exist.