Closed sam-n-bell closed 6 years ago
Thank you very much for your bug report! This error was caused due to handling a vue.js object as a normal object (observer object was involved at the parsing of values). I tried to get only the values needed using destructuring assignment (https://github.com/vuejs/Discussion/issues/292). I have published a new version at NPM, 1.0.5. Please let me know if that solves your problem.
Fix looks like it works, thank you for the response
When I bind json-data to a data property that is an array of objects and then export the csv, I'm seeing an extra column with the label obj present. Each row in that column under the label is [object Object].
Example:
In my template:
<vue-json-to-csv :json-data="test_export" :csv-title="'transactions'">
In the data function of my component:
data: function () { return { test_export: [{name: 'Joe', surname: 'Roe'}, {name: 'Joe', surname: 'Doe'}]};},
And result when exporting:
This is only happening when binding to an array in my component's data. If I have the json-data binded to in-line (not sure what the correct terminology is) data like in your examples, it works perfectly, but that isn't feasible for what I'm trying to do.