# array-pivot

> Pivot arrays of objects by key into a single object with a superset of keys containing arrays of each record's values.

Latest version **1.0.1** (published 2013-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-pivot
pnpm add array-pivot
yarn add array-pivot
bun add array-pivot
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2013-10-05 |
| First published | 2013-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Bryce B. Baril |
| Maintainers | bryce |
| Keywords | pivot, pivottable, table |

## Links

- npm: https://www.npmjs.com/package/array-pivot
- Repository: git@github.com:brycebaril/node-array-pivot
- Issues: https://github.com/brycebaril/node-array-pivot/issues
- npm.io page: https://npm.io/package/array-pivot

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2013-10-05
- 1.0.0 — 2013-09-05

## README

array-pivot
=====

[![NPM](https://nodei.co/npm/array-pivot.png)](https://nodei.co/npm/array-pivot/)

[![david-dm](https://david-dm.org/brycebaril/array-pivot.png)](https://david-dm.org/brycebaril/array-pivot/)
[![david-dm](https://david-dm.org/brycebaril/array-pivot/dev-status.png)](https://david-dm.org/brycebaril/array-pivot#info=devDependencies/)

Pivot arrays of objects by key into a single object with a superset of keys containing arrays of each record's values. Similar to a pivot table in a spreadsheet.

```javascript
var pivot = require("array-pivot")

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

console.log(pivot(data))

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

```

API
===

`pivot(data)`

LICENSE
=======

MIT

---
_Source: https://npm.io/package/array-pivot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
