-1

I'm reading a JSON file through javascript. I'm having trouble getting today/_text because of the forward slash. I can get today successfully by doing: {{hours.results[0].today}}. How would I get today/_text? I've tried:

today\/_text

today/\_text

today//_text

today\\/_text

 {"offset":0,"results":[{"today/_text":"Today:YES","today/_source":"/hours/1","today":"2,3,4"}]}
Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143

1 Answers1

2

hours.results[0]["today/_text"] should do the trick!

hours.results[0] returns an object that has that as a key, making that the easiest way to access the property in question.

TMan
  • 1,775
  • 1
  • 14
  • 26