Some of the keys have the format "something-something" and the JS code doesn't allow me to use them that way, I need a way around that
for example, I have this line, where I am resetting a React state
data.sprites.official-artwork.front_defaul
Some of the keys have the format "something-something" and the JS code doesn't allow me to use them that way, I need a way around that
for example, I have this line, where I am resetting a React state
data.sprites.official-artwork.front_defaul
You can simply use the bracket notation.
For your example:
data.sprites["official-artwork"].front_defaul