1.0.18 • Published 2 years ago

array-unpivot v1.0.18

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
2 years ago

array-unpivot

NPM

Pivot object of arrays into arrays of object. Inverse function for array-pivot

Install

$ npm install array-unpivot

Usage

var unpivot = require('array-unpivot')

var data = {
  foo: [1311, 41, 159],
  bar: ['cat', 11, 41],
  zzz: [124.31, 55],
  aaa: [12]
};

console.log(unpivot(data))

/*
[ { foo: 1311, bar: 'cat', zzz: 124.31, aaa: 12 },
  { foo: 41, bar: 11, zzz: 55 },
  { foo: 159, bar: 41 } ]
*/

API

unpivot(data)

data

Type: Object

Object of arrays

License

Source files are distributed under the Apache Version 2.0 license found in the LICENSE file.

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago