1
룬 문자 [ 'red'] [0] [ 'test']와 같은 3D 배열이 필요합니다.3D 배열 JavaScript
어떻게 할 수 있습니까?
var runes = {}
runes['red'] = [
'test': ['loh']
]
runes['blue'] = {}
runes['yellow'] = {}
미리 감사드립니다.
룬 문자 [ 'red'] [0] [ 'test']와 같은 3D 배열이 필요합니다.3D 배열 JavaScript
어떻게 할 수 있습니까?
var runes = {}
runes['red'] = [
'test': ['loh']
]
runes['blue'] = {}
runes['yellow'] = {}
미리 감사드립니다.
개체가있는 배열을 포함하는 개체를 원하십니까? 즉,이과 같습니다
runes["red"] = [
{test: "loh"},
{anotherTest: "anotherLoh"}
]
var runes = {}; // Object
runes.red = [ // containing Array of Objects
{'test': 'loh'}, // 0
{'test': 'blah'}, // 1
{property1: "value", property2: "value"} // 2...
];
alert(runes.red[0].test); // loh
너무 감사합니다! – owl