Concatenate two fields in jq
You can easily concatenate two fields in jq using the +
operator.
echo '{"channel": "youtube", "profile_type": "video", "member_key": "hello"}' \
| jq '{channel: (.profile_type + "." + .channel)}'
You can easily concatenate two fields in jq using the +
operator.
echo '{"channel": "youtube", "profile_type": "video", "member_key": "hello"}' \
| jq '{channel: (.profile_type + "." + .channel)}'