-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
  • 756,363
  • 169
  • 1,062
  • 1,111

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,203
  • 1
  • 12
  • 25