• toObject takes an array of T values, and a selector that produces key/value pairs from those inputs, and converts this array into an output object with those keys and values.

    For instance, given an array as follows

    [{ s: "a", n: 1 }, { s: "b", n: 2 }, { s: "c", n: 3 }]
    

    and whose selector is roughly (e) => [e.s, e.n], the resulting object will be

    { "a": 1, "b": 2, "c": 3 }
    

    Type Parameters

    • T
    • V

    Parameters

    Returns Output<{
        [key: string]: V;
    }>

Generated using TypeDoc