【问题标题】:API REST NodeJSAPI REST NodeJS
【发布时间】:2022-01-21 18:00:20
【问题描述】:

我正在使用 axios 制作 API REST 来获取数据。此数据已正确接收,但是当我访问该对象时,它给了我一个错误,因为该对象是 @graph,mabe 是因为它具有特殊字符。 ¿我如何访问@graph?

Object in the API i am trying to access

Code I have implement and error to access @graph

如果有人可以帮助我。谢谢

【问题讨论】:

标签: node.js api


【解决方案1】:

let test = {
  "@graph": "test value"
};
console.log(test["@graph"]);

试试

console.log(url.data["@graph"])

干杯

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-29
    相关资源
    最近更新 更多