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
  • 4,108
  • 10
  • 46
  • 87

1 Answers1

2

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

rdiz
  • 6,136
  • 1
  • 29
  • 41