**`jq`** approach:
jq -r '.[] | [.name, (.grp | map(.name) | join(" "))] | @tsv' input.json
The output:
cust1 BA2 GA1 NA1 TR3 TS1
**`jq`** approach:
jq -r '.[] | [.name, (.grp | map(.name) | join(" "))] | @tsv' input.json
The output:
cust1 BA2 GA1 NA1 TR3 TS1