Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Example objects contain duplicate keys #1062

Open
eecavanna opened this issue Aug 3, 2024 · 0 comments
Open

Documentation: Example objects contain duplicate keys #1062

eecavanna opened this issue Aug 3, 2024 · 0 comments

Comments

@eecavanna
Copy link

The "Data" section of https://www.papaparse.com/docs#results contains something that I think was not intentional on the part of the author.

When showing how the header: false behavior differs from the header: true behavior, it shows an example data structure in each case.

In the header: true example (linked below), the objects contains properties that do not have counterparts in the header: false example, and those properties happen to have the same keys as other properties in the same object. I assume this was the result of a copy/paste error at some point.

PapaParse/docs/docs.html

Lines 768 to 780 in a116779

// Example (header: true)
[
{
"Column 1": "foo",
"Column 2": "bar",
"Column 1": "foo1",
},
{
"Column 1": "abc",
"Column 2": "def",
"Column 1": "abc1",
}
]</code></pre>

I propose this as a fix:

 // Example (header: true) 
 [ 
 	{ 
 		"Column 1": "foo", 
 		"Column 2": "bar", 
- 		"Column 1": "foo1", 
 	}, 
 	{ 
 		"Column 1": "abc", 
 		"Column 2": "def", 
- 		"Column 1": "abc1", 
 	} 
 ]</code></pre> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant