0

I'm calling some JSON and within the JSON data one of the fields looks like : full/content so I call my data which I have as a variable named mainData so i'm trying to grab this field in my JSON :

mainData.full/content but the slash used within the data field spits out an error. How can I add a trailing slash (escape the slash so I can use it) to be able to grab the data in this field?

Thanks

pourmesomecode
  • 3,728
  • 6
  • 40
  • 82

1 Answers1

2

You can access it like this: mainData['full/content'].

rdiz
  • 5,837
  • 1
  • 27
  • 38