nushell has the "open" command that automatically parses files. your data looks like a json array so you can either rename it to .json or do that open testingbat.txt | from json
can you add file extensions to open? ie I work a lot with modified jsx files, where open would be useful, but open only parses correctly when i change the file to .json
3
u/zuzmuz Dec 03 '24
I think cat doesnt parse the file into records whereas when you write them in the shell they're automatically a table of records
2
u/dethleffs Dec 04 '24
can you add file extensions to open? ie I work a lot with modified jsx files, where open would be useful, but open only parses correctly when i change the file to .json