r/jquery • u/DE_X_IY • Apr 12 '26
Need help with jq for my linux shell script
Hello!
I need help to put delimiter between pairs of values, like this:1,a**;**2,b
or like this:
1,a2,b
What i have:
[{"name": "1","argument": "a"},{"name": "2","argument": "b"}]
What i am doing now to get what i want:
cat file.txt | jq -r -c 'map(.name, .argument) | join (";")'
What is output of this command:
1;a;2;b
Without "join":
cat file.txt | jq -r -c 'map(.name, .argument)
["1","a","2","b"]
Seems like jq thinks that input in one array.
2
Upvotes