How can I check if json has a specific object? [closed]

I’m using a php code to download, change and upload a json file.

The json looks like this:

{"common": ["rtb.com"],"orgs": { "12345": { "domains": { "test.com": ["blabla.com"]} }}}
How can I ask the php to check if the ‘orgs’ object exists?

I tried using isset function which didn’t give me the result I expected.

‘if (array_key_exists(“orgs”,$data)){echo “orgs exist”;};
echo “orgs don’t exist”;