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


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

“id”: “14332”,
“type”: “page”,
“status”: “current”,
“title”: “”,
“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 ?



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.


Hi Mukesh,

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