Using Papa Parse 4, I am encountering an issue when using Papa.unparse(collection). It appears that the resulting table is only generating columns based on the fields of the first document in my JSON collection. I would like all possible fields from my collection to be represented in the table.
For example:
{ "name": "Ross" },
{ "name": "Bob", "age": 63 }
This creates a table with just one column: "name":
name
Ross
Bob
But what I want is:
name age
Ross
Bob 33
Is there a way to make Papa Parse use the largest JSON object to determine the columns?