title: Rename property depending on value of sub-property using a Jolt spec
body: <p>I have a need to change the name of JSON property but only if the value of a sub-property is a specific value. In the example below I want to rename <code>data.relationships.policyHolder</code> to <code>data.relationships.companies</code> but only if <code>data.relationships.policyHolder.data.type</code> equals <code>"companies"</code>. Can jolt do something like this?</p>
  
  <p><strong>Input</strong></p>
  
  <pre><code>{
  "data": {
      "type": "clients",
      "id": "U5QYNSHY27CPD6DBQL2PRV6EU2BIJZ6G6STH47Q-",
      "relationships": {
          "policyHolder": {
              "data": {
                  "type": "companies",
                  "id": "U5QYNSHY27CPD6DBQL2PRV6EU34NPSGEQKCOPRXUUZ7H4---"
              }
          },
          "persons": {
              "data": {
                  "type": "persons",
                  "id": "6H4IN45HMHCKN6MG27ZE5V6EU34NPRVD6GB6PEI-"
              }
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Output</strong></p>
  
  <pre><code>{
  "data": {
      "type": "clients",
      "id": "U5QYNSHY27CPD6DBQL2PRV6EU2BIJZ6G6STH47Q-",
      "relationships": {
          "companies": {
              "data": {
                  "type": "companies",
                  "id": "U5QYNSHY27CPD6DBQL2PRV6EU34NPSGEQKCOPRXUUZ7H4---"
              }
          },
          "persons": {
              "data": {
                  "type": "persons",
                  "id": "6H4IN45HMHCKN6MG27ZE5V6EU34NPRVD6GB6PEI-"
              }
          }
      }
  }
  </code></pre>