I have some json object that I decoded, and one of the attributes starts with an \"@\" and I can\'t access the element with php because it throws an error.
You can access it by a string:
echo $obj->{'@attributes'}->id; // levaka0B8a
Or a variable:
$name = '@attributes';
echo $obj->$name->id;
For more information on how variables are defined and used, see the following docs: