0

I use node.js. I try to get JSON data from one company's JSON URL but JSON data's few strings have "-".

for example:

"duo-fpp":{
   "fdss" : 5,
   "fdsfsd" : 7 
}

this is my code:

var sevenres = JSON.parse(body);
console.log(sevenres.data.attributes.ModeStats.duo-fpp.assists);

When I start my code, I get this error: fpp is not defined

How can I get JSON data with "-" ?

Nazim Kerimbekov
  • 4,712
  • 8
  • 34
  • 58

0 Answers0