Skip to content
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.

Exporting array of objects, some rows have columns in a different order... #12

Open
kimptoc opened this issue Mar 27, 2014 · 1 comment

Comments

@kimptoc
Copy link

kimptoc commented Mar 27, 2014

Hi,

Many thanks for this package - very useful.

I am using it to convert an array of objects, most come out ok, columns in the same order, but a few come out with the columns jumbled up - relative to the rest.

Looking at the code, it just iterates over the properties to convert it into an array.

Any plans to try to make it more consistent?

Perhaps look at the first object and then use that to determine the fields to use for the others. Although that assumes that they are all the same...

Cheers,
Chris

@zevero
Copy link

zevero commented May 24, 2016

I have implemented it in my fork (which is forked from https://github.com/jczaplew/csv-express to include headers)

https://github.com/zevero/csv-express

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants