Robin Carlo Catacutan
Robin Carlo Catacutan

Reputation: 13679

Retrieve json data object with @

How can I return values that has key name '@' Using PHP

[directory] => stdClass Object
                (
                    [@id] => 87e0cfeb-e7ea-4814-80ac-a98f770811eb
                    [@title] => _root
                    [@hasClips] => 1
                )

Upvotes: 1

Views: 45

Answers (1)

xdazz
xdazz

Reputation: 160833

You could do this:

$your_variable->{"@id"}

Upvotes: 2

Related Questions