title: How to perform mapping values in jolt
body: <p>I am trying to perform conditional mapping of values from the following JSON.</p>
  
  <p>My input,</p>
  
  <pre><code>   {
    "rating": [
      {
        "id": 1,
        "locations": [
          {
            "num": 1
          },
          {
            "num": 2
          }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>Expected output: </p>
  
  <pre><code>  {
    "rating": [
      {
        "id": 1,
        "locations": [
          {
            "num": 1
          }
        ],
        "new_locations": [
          {
            "num": 2
          }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>My spec,</p>
  
  <pre><code>  [
    {
      "operation": "shift",
      "spec": {
        "rating": {
          "*": {
            "locations": {
              "*": {
                "num": "@(3,id)"
              }
            }
          }
        }
      }
    }
  ]
  </code></pre>
  
  <p>If the num value matches with id,then it should stay in location array else should be moved to new_locations.</p>
  
  <p>Can anyone please suggest me help.Thanks.</p>