JustinK101 Posted May 18, 2011 Share Posted May 18, 2011 We have a complex, json object which is multiple levels deep. We need to search for a given property/key in the entire object (not just first occurrence, but all), and if we find the property, return where in the object each property exists, so we can modify the properties value. Figure it needs to be recursive. Link to comment https://forums.phpfreaks.com/topic/236795-find-property-in-object/ Share on other sites More sharing options...
btherl Posted May 18, 2011 Share Posted May 18, 2011 Ok, that makes sense. Do you have some code you want some feedback on, or are you looking for general ideas? Link to comment https://forums.phpfreaks.com/topic/236795-find-property-in-object/#findComment-1217282 Share on other sites More sharing options...
Maq Posted May 18, 2011 Share Posted May 18, 2011 More of a statement than a question. As btherl mentioned, we need some more information to go off of. Example data, code, etc. would be very helpful. Link to comment https://forums.phpfreaks.com/topic/236795-find-property-in-object/#findComment-1217292 Share on other sites More sharing options...
pornophobic Posted May 18, 2011 Share Posted May 18, 2011 http://php.net/manual/en/function.get-object-vars.php http://php.net/manual/en/function.var-dump.php http://www.php.net/manual/en/function.get-class-methods.php http://www.php.net/manual/en/function.get-called-class.php http://www.php.net/manual/en/function.get-declared-classes.php http://www.php.net/manual/en/function.get-declared-interfaces.php http://www.php.net/manual/en/function.property-exists.php Link to comment https://forums.phpfreaks.com/topic/236795-find-property-in-object/#findComment-1217293 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.