title: JOLT: copy attributes from another array, matching by key value
body: <p>Given the following <code>input</code> json:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;colleges&quot;: [
      {
        &quot;id&quot;: 10369272,
        &quot;name&quot;: &quot;UNIVERSITY OF SAN DIEGO&quot;
      },
      {
        &quot;id&quot;: 10331208,
        &quot;name&quot;: &quot;UNIVERSITY OF CALIFORNIA - BERKELEY (EXTENSION)&quot;
      },
      {
        &quot;id&quot;: 10331207,
        &quot;name&quot;: &quot;SEATTLE PACIFIC UNIVERSITY&quot;
      }
    ],
    &quot;degrees&quot;: [
      {
        &quot;id&quot;: 6215911,
        &quot;type&quot;: &quot;Bachelor of Arts&quot;,
        &quot;collegeId&quot;: 10331207
      },
      {
        &quot;id&quot;: 6235281,
        &quot;type&quot;: &quot;Bachelor of Science&quot;,
        &quot;collegeId&quot;: 10331208
      }
    ]
  }
  </code></pre>
  <p>and the desired <code>output</code> of:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;colleges&quot;: [
      {
        &quot;name&quot;: &quot;UNIVERSITY OF SAN DIEGO&quot;
      },
      {
        &quot;name&quot;: &quot;UNIVERSITY OF CALIFORNIA - BERKELEY (EXTENSION)&quot;,
        &quot;degreeType&quot;: &quot;Bachelor of Science&quot;
      },
      {
        &quot;name&quot;: &quot;SEATTLE PACIFIC UNIVERSITY&quot;,
        &quot;degreeType&quot;: &quot;Bachelor of Arts&quot;
      }
    ]
  }
  </code></pre>
  <p>how would a JOLT spec look like to associate correct degrees with correct colleges?</p>
  <p>In other words I need to locate a correct <code>degree</code> by the college id, extract its <code>type</code> and place it under the correct <code>college</code>.</p>
  <p>Struggling to find a similar example somewhere.
  Any suggestion is highly appreciated.</p>