我得到一个对象作为api调用的响应
对象如下所示
现在,当我尝试response._modifiedby_value
时,我得到了正确的答案,但是当我尝试response.createdby_value@OData.Community.Display.V1.FormattedValue
时,我收到以下错误
Uncaught SyntaxError {message: "Unexpected token ILLEGAL"}
答案 0 :(得分:4)
那是因为'@'是一个特殊字符,所以你不能这样做:
response.createdby_value@OData = 2;
但是
response["createdby_value@OData"] = 2;