Skip to content

How to filter, flatten and rewrite REST-api results #126

Answered by ansibleguy76
ansibleguy76 asked this question in Q&A
Discussion options

You must be logged in to vote

you need to rewrite the output with jq.

you already use [.records[]] => you must enhance this.

jqplay snippet

[.records[] | {id:.id,display:.display,segment:.custom_fields.segment_name}]
Try this snippet, you will see

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ansibleguy76
Comment options

Comment options

You must be logged in to vote
3 replies
@MalfuncEddie
Comment options

@ansibleguy76
Comment options

Answer selected by ansibleguy76
@MalfuncEddie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants