@nevware21/ts-utils
    Preparing search index...

    Function arrUnzip

    • The arrUnzip() method reverses the operation of arrZip(). Given an array of grouped elements, it creates multiple arrays where each contains elements from the same position in each group. This is the inverse operation of arrZip().

      Parameters

      • theArray: ArrayLike<ArrayLike<any>>

        An array of arrays to unzip

      Returns any[][]

      An array of arrays, ungrouped by position

      0.14.0

      arrUnzip([[1, "a"], [2, "b"], [3, "c"]]);           // [[1, 2, 3], ["a", "b", "c"]]
      arrUnzip([[1, "a", true], [2, "b", false]]); // [[1, 2], ["a", "b"], [true, false]]
      arrUnzip([[1], [2], [3]]); // [[1, 2, 3]]
      arrUnzip([]); // []

      // Array-like objects
      arrUnzip({ length: 2, 0: [1, "x"], 1: [2, "y"] }); // [[1, 2], ["x", "y"]]