Small description
As described in issue title; details below.
Expected result
VisiData should render all key-value information for top-level JSON/YAML dicts.
Actual result with screenshot
See below.
Steps to reproduce with sample data and a .vd
Command: vd https://raw.githubusercontent.com/simonw/museums/master/museums.yaml -f yaml
Compare the keys for the VisiData-loaded sheet vs. the keys in the second item in the YAML file. It seems that VisiData checks only the first item in a JSON/YAML list before determining the columns for the entire sheet. To me, that's unexpected and has, a few times, given me an incorrect impression of the data in a file.
Ideally, these loaders would, as they iterated through a file, append columns to the sheet as they encountered new keys.
Additional context
v2.-4dev, revision 96e5ab66 (Sunday, April 19)
I can take a look at this. I ran into similar behavior when expanding columns, so the changes from #497 could be useful as a reference here.
@ajkerrigan @jsvine Can this be closed? =)
Yes, thanks! And my apologies: I appear to have been mistaken re. the JSON aspect. Thank you both!
Most helpful comment
I can take a look at this. I ran into similar behavior when expanding columns, so the changes from #497 could be useful as a reference here.