How can I retrieve a key value in a hierarchical json?

Hello!

I am trying to confirm if a specific key exists in a hierarchical Json like below;

{
“id”: “14332”,
“type”: “page”,
“status”: “current”,
“title”: “1.1.1.1”,
“macroRenderedOutput”: {},
“body”: {
“storage”: {
“value”: "<ac:structured-macro ac:name="details"

I know the first level of keys are able to be checked by using ContainsKey method.
(e.g .ContainsKey(“body”) can use to check if the “body” key exists in above Json and it would respond “true”)
However, I can nod find the method which can check its existence the keys under 2nd level or lower.

Is this what is required ?

_XmlDocument.Element(“Config”).Element(“SAP”).Element(“UserName”).Value


Mukesh

Hi Robert!

Thanks for your prompt reply.
Unfortunately, my target is Json (not XML) and Element method is not available for JObject.
In addition, I would like to get Boolean, not the exact value of it.

If you have any other idea, it would be very appreciated.

Thanks!

Hi Mukesh,

Sorry. I made a mistake for your name.
Thanks again!

Hi mate, did you ever figure this one out?