php - Check is value iside an object array -


my array this

stdclass object (     [lc_anuradhapura] => array         (             [0] => attr_balapitiya-boat-rides             [1] => attr_bird-watching-in-kandalama         )      [lc_bentota] => array         (             [0] => attr_city-tour             [1] => attr_colombo-national-museum         )      [lc_colombo] => array         (             [0] => attr_cultural-show             [1] => attr_cycling         )  ) 

i need check 'attr_cycling' inside 'lc_colmbo'. it's need check dynamically, through common loop.

var found = false; loop: (var in obj) {   if (obj.hasownproperty(i)) {     (var j = 0; j < obj[i].length; j++) {       if (obj[i][j] === "attr_cycling") {         found = true;         break loop;       }     }   } } 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -