title: How to extract and display field in android
body: <p>Please fins Main.java code below</p>
  
  <pre><code>public class Main extends Activity implements OnClickListener {
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      findViewById(R.id.my_button).setOnClickListener(this);
  }
  
  @Override
  public void onClick(View arg0) {
      Button b = (Button)findViewById(R.id.my_button);
      b.setClickable(false);
      new LongRunningGetIO().execute();
  }
  
  private class LongRunningGetIO extends AsyncTask &lt;Void, Void, String&gt; {
  
      protected String getASCIIContentFromEntity(HttpEntity entity) throws IllegalStateException, IOException {
         InputStream in = entity.getContent();
           StringBuffer out = new StringBuffer();
           int n = 1;
           while (n&gt;0) {
               byte[] b = new byte[4096];
               n =  in.read(b);
               if (n&gt;0) out.append(new String(b, 0, n));
           }
           return out.toString();
      }
  
      @Override
      protected String doInBackground(Void... params) {
           HttpClient httpClient = new DefaultHttpClient();
           HttpContext localContext = new BasicHttpContext();
           HttpGet httpGet = new HttpGet("http://191.166.1.88:2000");
           String text = null;
           try {
                 HttpResponse response = httpClient.execute(httpGet, localContext);
                 HttpEntity entity = response.getEntity();
                 text = getASCIIContentFromEntity(entity);
           } catch (Exception e) {
               return e.getLocalizedMessage();
           }
           return text;
      }   
  
      protected void onPostExecute(String results) {
          if (results!=null) {
              EditText et = (EditText)findViewById(R.id.my_edit);
              et.setText(results);
          }
          Button b = (Button)findViewById(R.id.my_button);
          b.setClickable(true);
        }
       }
       }
  </code></pre>
  
  <p>I am getting the JSON data from REST API, it is as shown below</p>
  
  <pre><code> {"Tm":{"Time": "Mon Nov 20 12:45:59 IST 2015"},"Name":
   {"Host": "u1", "IP": "190.166.169.137"},"Speed":{"cpu":   
     2494.259033203125}}
  </code></pre>
  
  <p>How to extract only Nama of Host that is "u1" and display in text box in android. I am new to it please help</p>