-1

Suppose I have a JSON property starting with #, for example:

var person = { "#name": "superman" };

How do I refer to it in my JS code? person.#name is not working in my editor (webstorm)?

It is supposed to be valid JSON.

Marty
  • 39,033
  • 19
  • 93
  • 162
user603007
  • 11,416
  • 39
  • 104
  • 168

1 Answers1

3

Bracket notation?

var name = person["#name"];

There is more information on this thread.

Community
  • 1
  • 1
Marty
  • 39,033
  • 19
  • 93
  • 162