You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to flatten the data for import into RDBMS tables (via the @csv operator), with each object in the "history" array (with 1 or more array elements) as a separate line with the parent fields duplicated, as in:
I see a flatten command coming in jq 1.5, but not sure if it or another method is already available in jq 1.4. Noting the "id" field is duplicated in name (as with the data I am receiving), I could either deal with it by position, or accept a prefix assigned by jq.
Is there a generic pattern in jq to flatten a 1-level nested array like this?
The text was updated successfully, but these errors were encountered:
Given:
I am attempting to flatten the data for import into RDBMS tables (via the @csv operator), with each object in the "history" array (with 1 or more array elements) as a separate line with the parent fields duplicated, as in:
eventually becoming
I see a flatten command coming in jq 1.5, but not sure if it or another method is already available in jq 1.4. Noting the "id" field is duplicated in name (as with the data I am receiving), I could either deal with it by position, or accept a prefix assigned by jq.
Is there a generic pattern in jq to flatten a 1-level nested array like this?
The text was updated successfully, but these errors were encountered: