title: How to skip json object (from json array) in android if it has an empty/null value?
body: <p>I'm developing an app where user can get list of other users, but i have to skip the users if they dont have completed their profile</p>
  
  <p>ok take a look at my code:</p>
  
  <pre><code>Iterator&lt;String&gt; keys = json.keys();
                          while (keys.hasNext()) {
                              String key = keys.next();
                              JSONObject js = json.optJSONObject(key);
                              if (js != null) {
                                  String user_info = js.getString("user_info");
                                  user.setInfo(user_info);
                              } else {
  
                              }
                          }
  </code></pre>
  
  <p>what should i do in (else) </p>
  
  <p>heres my json:</p>
  
  <pre><code> "users": [
  {
    "id": 73,
    "name": "Name",
    "lastname": "Lastname",
    "email": "",
    "create_date": 1469874203
  },
  {
    "id": 73,
    "name": "Name",
    "lastname": "Lastname",
    "email": "",
    "create_date": 1469874203
    "profile"{
             "address": string...
             "avatar": url...
        }
  
  },
  </code></pre>
  
  <p>something like that</p>