Empty objects are ignored by flatten
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I was using with `paraparase` and found that it ignores the empty object/array results in `[object/object]` in CSV download.
```
[
{
"token": "YCMG4IRRE6",
"payment": {
"currency": "USD",
"amount": 10
},
"tracking": {}
}
]
const flattenned = data.map((d) =>
flatten(d)
);
return Papa.unparse(flattenned);
```

Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the supplied data transformation by passing the example object through flatten before Papa.unparse, and inspect how the empty tracking object and arrays are handled. Trace the flatten entry point and verify that the empty values are preserved instead of becoming [object/object] in the CSV output; done when the example produces the expected CSV behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100