fix: use .[][].name in jq for wrapped JSON response #31
Reference in New Issue
Block a user
Delete Branch "fix/completion-jq-wrapped-json"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
{ "resources": [...] }not bare arrays, so.[].namesilently produced no output.[][].nameto unwrap the outer object then iterate the array.[].namemistakepr.shnow auto-loads.env(no need tosource .envfirst)Test plan
mcpctl get projects -o json | jq -r '.[][].name'returns only project namesmcpctl get servers -o json | jq -r '.[][].name'returns only server namesAPI returns { "resources": [...] } not bare arrays, so .[].name produced no output. Use .[][].name to unwrap the outer object first. Also auto-load .env in pr.sh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>