Construct script filter JSON with jq from bash array in Workflow Help & Questions Posted June 20, 2020 jq -n --argjson country '["france", "netherlands", "denmark"]' -f <(echo '{"items":[$country[] as $name | {"uid":$name,"title":$name,"arg":$name,"autocomplete":$name,"icon":{"path":("icons/" + $name + ".png")}}]}') gohoyer 1
Construct script filter JSON with jq from bash array
in Workflow Help & Questions
Posted
jq -n --argjson country '["france", "netherlands", "denmark"]' -f <(echo '{"items":[$country[] as $name | {"uid":$name,"title":$name,"arg":$name,"autocomplete":$name,"icon":{"path":("icons/" + $name + ".png")}}]}')