I have coding mentioned below. I want to get the values of response_text and response_code from this array. Anyone can help me how to get the particular key values.
stdClass Object
(
[_OPS_version] => 0.9
[protocol] => XCP
[request_response_time] => 0.441
[response_text] => Command completed successfully
[is_search_completed] => 1
[action] => REPLY
[attributes] => stdClass Object
(
[suggestion] => stdClass Object
(
[count] => 0
[response_text] => Missing tld list, supported tlds are [.com,.net,.org,.info,.biz,.us,.mobi]
[response_code] => 500
[is_success] => 0
)
)
[response_code] => 200
[is_success] => 1
)
Thanks in advance
Use the namespace System.Reflection, try using PropertyInfo[] info = stdClass.GetProperies(), then just loop through each property and check the value on a debug mode.