I have a rather strange question. I have a json object with an @ character in its attribute name, like for example the na@me. I can't call on it since I can't make use of an @ character in the object.
Well change the character is perhaps your most obvious answer, but I wonder if there is another solution besides this? How I can call the na@me attribute?
<!DOCTYPE html>
<html>
    <body>
        <h2>JSON Object Creation in JavaScript</h2>
        <p id="demo"></p>
        <script>
            var text = '{"na@me":"John Johnson","street":"Oslo West 16","phone":"555 1234567"}'
            var obj = JSON.parse(text);
            document.getElementById("demo").innerHTML =
                obj.na@me + "<br>" +
                obj.street + "<br>" +
                obj.phone;
        </script>
    </body>
</html>
 
     
    