tongshen9095 / JobRecommendation

0 stars 0 forks source link

check a json key does not exist or is empty #9

Open tongshen9095 opened 4 years ago

tongshen9095 commented 4 years ago

check a json key exist - stackoverflow check a jsonobject does not exist or is null - stackoverflow

// obj is a JSONObject
if (obj.exist(key) && !obj.isnull(key)) {
  // do somthing with the object
};