title: How to filter and print selective map object in key value format
body: <p>I am trying to filter key from a hash map and print in hybrid key value format. I have the same logic working well for csv format as below. In below code, i am selecting only few of the features from response object and returning as comma separated value.</p>
  <pre><code>public String mycsvformat(Response response, String[] selectedFeature) {
         return Stream.concat(
              Stream.of(response.getId()),
              Arrays.stream(selectedFeature)
                      .map(f -&gt; response.getFeature().get(f))
                      .map(v -&gt; v == null ? &quot;&quot; : v.toString())
      )
              .collect(Collectors.joining(&quot;,&quot;));
  }
  </code></pre>
  <p><strong>Output:</strong></p>
  <pre><code>id1,feature1Value,feature3Value,feature4Value
  </code></pre>
  <p>Response Class -</p>
  <pre><code>public class Response {
      private String id;
      private Map&lt;String, Object&gt; feature;
  }
  </code></pre>
  <p>Now I need to print the response in below format:</p>
  <pre><code>id1    feature1Key=feature1Value,feature3Key=feature3Value,feature4Key=feature4Value
  </code></pre>
  <p>Tab separation after id and rest all in key value pair. Please suggest.</p>