J
J
jtag2018-03-22 10:15:46
JavaScript
jtag, 2018-03-22 10:15:46

How to refer to the elements of an object?

I load objects from json into the canvas.
Can't access canvas objects in any way.
If you write "typeof list" - returns an object.

canvas.loadFromJSON(data[1]);
let list = canvas.getObjects();
console.log(list);

writes in the console:
5ab355ba469bf844065814.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drengr, 2018-03-23
@Drengr

For example Where 0 is the number you see at the beginning of the line. list is an array but in js

let a = [];
typeof a === 'object';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question