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
Post a Comment