![]() ![]() Using Miller ( ) you can "flat" the JSON, running mlr -j2c cat input.json >output.csv name]|join(" ") (and for the type), so that your command becomes jq -r '. To create author name strings that are concatenations of all author names (and similarly for author types), with as delimiter, you could instead of. but notice how I'm forced to decide that we're only ever interested in the first author (the. It is straight forward to extract the relevant data from each array entry into a shorter flat array and convert that into CSV with in jq: jq -r '. The issue is not really that the JSON that you show is an array, but that each element of the array (of which you only have one) is a fairly complex structure. ",ĭesired Format: id, link, context, type, name, inLanguage, image, author_type, author_name, license_type, license_url, license_name The goal of each section is to enable students not just to recognize concepts, but to work with them in ways that will be useful in later courses, future careers, and as engaged citizens. ![]() The book builds upon what students have already learned and emphasizes connections between topics as well as between theory and applications. ![]() "disambiguatingDescription": "The content of this textbook has been developed and arranged to provide a logical progression from the fundamental principles of institutional design at the founding, to avenues of political participation, to thorough coverage of the political structures that constitute American government. ![]() How can I convert the JSON into a CSV with jq or another tool when the input is an array instead of an object. It seems most of the solutions expect the JSON to be a single object rather than an array of objects.Īll the solutions I've tried from here seem to break with my input, which comes from curling this site. I'm looking at solutions to convert JSON to a CSV. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |