title: Transform Array of objects with Jolt
body: <p>I'm trying to convert one array of objects into output JSON without wrapper key in it using <code>JOLT</code>.</p>
  
  <p><strong>INPUT</strong></p>
  
  <pre><code>{
    "emps": [
      {
        "emp": {
          "empId": "2A68",
          "emailAddress": "abc@xyz.com",
          "name": "abc",
          "userId": "82869",
          "userType": "none",
          "phoneNumber": "1234",
          "rank": "2"
        }
      }
    ]
  }
  </code></pre>
  
  <p><strong>SPEC I TRIED</strong></p>
  
  <pre><code>[
    {
      "operation": "shift",
      "spec": {
        "emps": {
          "*": {
            "empId": "data.result[&amp;1].emps[&amp;1].empId",
            "name": "data.result[&amp;1].emps[&amp;1].name",
            "phoneNumber": "data.result[&amp;1].emps[&amp;1].phone",
            "emailAddress": "data.result[&amp;1].emps[&amp;1].email"
          }
        }
      }
    },
    {
      "operation": "default",
      "spec": {
        "data": {
          "result[]": {
            "*": {
              "emps[]": []
            }
          }
        }
      }
    }
  ]
  </code></pre>
  
  <p><strong>EXPECTED OUTPUT</strong></p>
  
  <pre><code>{
    "data" : {
      "result" : [ {
        "emps" : [ {
          "empId" : "2A68",
          "name" : "abc",
          "phone" : "1234",
          "email" : "abc@xyz.com"
        } ]
      } ]
    }
  }
  </code></pre>
  
  <p>Please copy and paste the above <code>INPUT</code> and <code>OUTPUT</code> <a href="http://jolt-demo.appspot.com/#inception" rel="nofollow noreferrer">here</a>
  If I remove <code>emp</code> wrapper from input then its working fine as expected but not getting how can I get the same output with <code>emp</code> wrapper.</p>
  
  <p>Any help appreciated.</p>