0

I try to get the value of a JSON object from my TypeScript component. It's working for all keys except one that contains a / in the key (e.g. "a/b": 10)

PS: .["a/b"] is also not working.

prosk
  • 133
  • 1
  • 1
  • 7

1 Answers1

0

You could use Bracket Notation for the same.

Try this without any .

obj["a/b"]
Pardeep Jain
  • 78,495
  • 36
  • 155
  • 210