title: How to edit JSON API response
body: <p>I am using <a href="http://manage.directi.com/kb/answer/764" rel="nofollow">this api</a> </p>
  
  <pre><code>https://test.httpapi.com/api/domains/available.json?auth-userid=0&amp;api-key=key&amp;domain-name=domain1&amp;domain-name=domain2&amp;tlds=com&amp;tlds=net
  </code></pre>
  
  <p>When I pass some parameters in this api it gives me output in this format </p>
  
  <pre><code>{
  "apple.com":{"status":"regthroughothers","classkey":"domcno"},
  "asdfgqwx.com":{"status":"available","classkey":"domcno"},
  "microsoft.org":{"status":"unknown"},
  "apple.org":{"status":"unknown"},
  "microsoft.com":{"status":"regthroughothers","classkey":"domcno"},
  "asdfgqwx.org":{"status":"unknown"}
  }
  </code></pre>
  
  <p>This Json format is very strange for me.. So I want to change Json format like this </p>
  
  <pre><code>[{
          "name": "apple.com",
          "status": "regthroughothers",
          "classkey": "domcno"
      },
      {
          "name": "asdfgqwx.com",
          "status": "available",
          "classkey": "domcno"
      },
      {
          "name": "microsoft.org",
          "status": "unknown",
          "classkey": ""
      },
      {
          "name": "apple.org",
          "status": "unknown",
          "classkey": ""
      },
      {
          "name": "microsoft.com",
          "status": "regthroughothers",
          "classkey": "domcno"
      },
      {
          "name": "asdfgqwx.org",
          "status": "unknown",
          "classkey": "domcno"
      }]
  </code></pre>
  
  <p>I am using this code for using API.</p>
  
  <pre><code> protected string GET(string url)
      {
          HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
          try
          {
              WebResponse response = request.GetResponse();
              using (Stream responseStream = response.GetResponseStream())
              {
                  StreamReader reader = new StreamReader(responseStream, System.Text.Encoding.UTF8);
                  return reader.ReadToEnd();
              }
          }
          catch (WebException ex)
          {
              WebResponse errorResponse = ex.Response;
              using (Stream responseStream = errorResponse.GetResponseStream())
              {
                  StreamReader reader = new StreamReader(responseStream, System.Text.Encoding.GetEncoding("utf-8"));
                  String errorText = reader.ReadToEnd();
                  // log errorText
              }
              throw;
          }
      }
  </code></pre>