ng-csv icon indicating copy to clipboard operation
ng-csv copied to clipboard

Labels options requires all objects to have all keys present

Open SlothFriend opened this issue 7 years ago • 0 comments

Not all of my objects have the same properties. Some of the objects have additional fields at the end, but the column headers do not get displayed for these properties. For example, this array would produce the issue:

[
  {'a': 1, 'b': 2},
  {'a': 1, 'b': 2, 'a (2)': 12, 'b (2)': 22},
  {'a': 1, 'b': 2},
]

This would result in the following column headers: ['a', 'b', '', '']. I would expect this instead: ['a', 'b', 'a (2)', 'b (2)'].

SlothFriend avatar Dec 18 '17 22:12 SlothFriend