Comparing version 5.0.0 to 5.0.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [5.0.1](https://github.com/zemirco/json2csv/compare/v5.0.0...v5.0.1) (2020-04-28) | ||
### Bug Fixes | ||
* wrong call to processValue ([#454](https://github.com/zemirco/json2csv/issues/454)) ([66abd45](https://github.com/zemirco/json2csv/commit/66abd45)) | ||
## [5.0.0](https://github.com/zemirco/json2csv/compare/v4.5.2...v5.0.0) (2020-03-15) | ||
@@ -7,0 +14,0 @@ |
@@ -96,3 +96,3 @@ 'use strict'; | ||
return fastJoin( | ||
this.opts.fields.map(fieldInfo => this.processValue(fieldInfo.label, true)), | ||
this.opts.fields.map(fieldInfo => this.processValue(fieldInfo.label)), | ||
this.opts.delimiter | ||
@@ -99,0 +99,0 @@ ); |
{ | ||
"name": "json2csv", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Convert JSON to CSV", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -668,3 +668,3 @@ # json2csv | ||
const fields = ['carModel', 'price', 'colors']; | ||
const transforms = [unwind('colors')]; | ||
const transforms = [unwind({ paths: ['colors'] })]; | ||
@@ -697,3 +697,3 @@ const json2csvParser = new Parser({ fields, transforms }); | ||
```js | ||
const { Parser } = require('json2csv'); | ||
const { Parser, transforms: { unwind } } = require('json2csv'); | ||
@@ -745,3 +745,3 @@ const myCars = [ | ||
const fields = ['carModel', 'price', 'items.name', 'items.color', 'items.items.position', 'items.items.color']; | ||
const transforms = [unwind(['items', 'items.items'])]; | ||
const transforms = [unwind({ paths: ['items', 'items.items'] })]; | ||
const json2csvParser = new Parser({ fields, transforms }); | ||
@@ -770,3 +770,3 @@ const csv = json2csvParser.parse(myCars); | ||
```js | ||
const { Parser } = require('json2csv'); | ||
const { Parser, transforms: { unwind } } = require('json2csv'); | ||
@@ -818,3 +818,3 @@ const myCars = [ | ||
const fields = ['carModel', 'price', 'items.name', 'items.color', 'items.items.position', 'items.items.color']; | ||
const transforms = [unwind(['items', 'items.items'], true)]; | ||
const transforms = [unwind({ paths: ['items', 'items.items'], blankOut: true })]; | ||
@@ -885,3 +885,3 @@ const json2csvParser = new Parser({ fields, transforms }); | ||
const { Parser, transform: { unwind, flatten } } = require('json2csv'); | ||
const json2csvParser = new Parser({ transforms: [unwind(paths, true), flatten('__')] }); | ||
const json2csvParser = new Parser({ transforms: [unwind({ paths, blankOut: true }), flatten('__')] }); | ||
const csv = json2csvParser.parse(myData); | ||
@@ -888,0 +888,0 @@ ``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
443094