json-2-csv
json-2-csv copied to clipboard
Paginated conversion ?
Background Information
- Module Version:
4.0.0 - Node/Browser Version:
18
The issue I'm reporting is with:
- [ ] json2csv
- [X] csv2json
I have...
- [X] searched to see if an issue has already been reported.
- [X] verified that my JSON/CSV data is valid (using something like http://jsonlint.com or https://csvlint.io/).
- [X] tried upgrading to the latest version of json-2-csv (since the issue may already be fixed).
Expected Behavior
Convert specific number of lines, and ability to select a range something like paginated conversion .
Actual Behavior
There is no way to achieve that i think ?
Data Sample
CSV:
h1, h2, h3
c1, c2, c3,
b1, b2, b3,
f1, f2, f3,
d1, d2, d3,
convert only second line
JSON:
{
"h1": "b1",
"h2": "b2",
"h3" : "b3",
}
Hi @salimdriai, thanks for reporting this. You're right - there's currently no way to effectively paginate the returned CSV at the moment. I could definitely see a skip and limit option being reasonable additions. There might be some rework needed to handle this more efficiently in the CSV parser itself though. I'm definitely open to a merge request for this if you or someone else is up for adding this capability.