title: How to map json response object to a preferred format using Jackson / other library?
body: <p>I am getting the below JSON response format from a third party web service:</p>
  
  <pre><code>{
      "meta": {
          "code": 200,
          "requestId": "1"
      },
      "response": {
          "locations": [
              {
                  "id": "1",
                  "name": "XXX",
                  "contact": {
                      phone: '123',
                      email: 'abc'
                  },
                  "location": {
                      "address": [
                          "Finland"
                      ]
                  }
              },
              {
                  // another location
              }
          ]
      }
  }
  </code></pre>
  
  <p>And here is what I should return as a response from my own web service:</p>
  
  <pre><code>[
      {
          "id": "1",
          "name": "XXX",
          "phone": '123',
          "address": "Finland"
      },
      {
          // another location
      }
  ]
  </code></pre>
  
  <p>What should I do? I've read some good stuff about Jackson but there are only a few simple examples where you map some simple JSON obj as is to POJO. In my case, I need to remove a few nodes, and also traverse deeper down the hierarchy to get the nested value. This is my baby step so far in my spring boot app:</p>
  
  <pre><code>    @GET
      @Path("{query}")
      @Produces("application/json")
      public String getVenues(@PathParam("query") String query){
          return client.target(url).queryParam("query",query).request(...).get(String.class)
      }
  </code></pre>
  
  <p>Any helps, pointers, recommendations are welcomed!</p>