Concat 2 fields in JSON using jq
<p>I am using <code>jq</code> to reformat my <code>JSON</code>.</p>

<p>JSON String:</p>

<p><code>{"channel": "youtube", "profile_type": "video", "member_key": "hello"}</code></p>

<p>Wanted output:</p>

<p><code>{"channel" : "profile_type.youtube"}</code></p>

<p>My command:</p>

<p><code>echo '{"channel": "youtube", "profile_type": "video", "member_key": "hello"}' | jq -c '. | {channel: .profile_type + "." + .member_key}'</code></p>

<p>I know that the command below concatenates the string. But it is not working in the same logic as above:</p>

<p><code>echo '{"channel": "youtube", "profile_type": "video", "member_key": "hello"}' | jq -c '.profile_type + "." + .member_key'</code></p>

<p>How can I achieve my result using ONLY jq?</p>