title: Get Specific data from json services while populating List
body: <p>i need to populate a list view from data coming under the tag "group" from a JSON array "video". the coding under it is working fine if i remove  if condition. Please help me guys. My boss is kicking my ass for this and my job is on the line. thanks in advance </p>
  
  <p>public class CountryJSONParser {</p>
  
  <pre><code>// Receives a JSONObject and returns a list
  public List&lt;HashMap&lt;String,Object&gt;&gt; parse(JSONObject jObject){      
  
      JSONArray jCountries = null;
      try {       
          // Retrieves all the elements in the 'countries' array 
          jCountries = jObject.getJSONArray("video");
          } 
      catch (JSONException e) {
          e.printStackTrace();
      }
  
       // Invoking getCountries with the array of json object
       // where each json object represent a country
      return getCountries(jCountries);
  }
  
  
  private List&lt;HashMap&lt;String, Object&gt;&gt; getCountries(JSONArray jCountries){
      int countryCount = jCountries.length();
      List&lt;HashMap&lt;String, Object&gt;&gt; countryList = new ArrayList&lt;HashMap&lt;String,Object&gt;&gt;();
      HashMap&lt;String, Object&gt; country = null; 
  
      // Taking each country, parses and adds to list object 
      for(int i=0; i&lt;countryCount;i++){
          try {
              // Call getCountry with country JSON object to parse the country 
              country = getCountry((JSONObject)jCountries.get(i));
              countryList.add(country);
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
      }
  
      return countryList;
  }
  
  // Parsing the Country JSON object 
  private HashMap&lt;String, Object&gt; getCountry(JSONObject jCountry){
  
      HashMap&lt;String, Object&gt; country = new HashMap&lt;String, Object&gt;();
      String countryName = "";
      String flag="";
      String language = "";
      String capital = "";
      String currencyCode = "";
      String currencyName = "";       
  
      try {
          countryName = jCountry.getString("Description");
          flag = jCountry.getString("thumbnailUrl");
          capital = jCountry.getString("title");
          language=jCountry.getString("group");
          Log.v("---","Country name: "+countryName+"Flag Url:"+flag+"Title"+capital);
              if(language.equals("RokuTest-VideoGroup")){     
          country.put("country", countryName);
          country.put("group", language);
          country.put("flag", R.drawable.ic_launcher);
          country.put("flag_path", flag);
          country.put("details", capital);
          Log.v("---","Country name: "+countryName+"Flag Url:"+flag+"Title"+capital);
              }
  
      } catch (JSONException e) {         
          e.printStackTrace();
      }       
      return country;
  }
  </code></pre>
  
  <p>}</p>