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
  • 9

1 Answers1

0

You could use Bracket Notation for the same.

Try this without any .

obj["a/b"]
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215