0

On the image You can see what I want to read

console.log("exact val = " + json._array.loftybot.spells.name)

and it gives [TypeError: Cannot read property 'spells' of undefined] You can see in terminal structure of json

How to get into these values? I want save values from json to array const json = new ObservableArray And then use all of these values in my program

enter image description here

Szmycu
  • 33
  • 6

1 Answers1

1

How about json._array[0].loftybot.spells.name? with an index 0 on your _array and go further on nested json. SEE at MDN

A l w a y s S u n n y
  • 36,497
  • 8
  • 60
  • 103