Home > Software engineering >  API REST NodeJS
API REST NodeJS

Time:01-21

I am making an API REST with axios to get the data. This data is recieved correctly but when I access to the object it gaves me an error since the object is @graph, an mabe is because it has an special character. ¿How can i access to @graph?

Object in the API i am trying to access

Code I have implement and error to access @graph

If someone could help me. Thanks

CodePudding user response:

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

try with

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

cheers

  •  Tags:  
  • Related