-1
다음과 같은 개체가 있습니다. propertymixed 배열에서 나는 배열을 ch_array 항목으로 바꾸려고합니다.개체의 배열 항목 바꾸기
var myObject = {
propertyString: "this is a string",
propertyAnotherString: "this is another string",
propertyMixedArray: [{"item 1"},{ "item 2"}, {"item 3"}],
propertyObject: { someProperty: "and so on..." }
};
ch_array =[{"new val1"},{ "new val 2"}, {"newval3"}];
var myObject = {
propertyString: "this is a string",
propertyAnotherString: "this is another string",
propertyMixedArray: [{"new val1"},{ "new val 2"}, {"newval3"}],
propertyObject: { someProperty: "and so on..." }
};
'myObject.propertyMixedArray = ch_array'? – trincot
간단 ...'myObject.propertyMixedArray = ch_array;' –
이것들은 적절한 JS 지정이 아님 – Redu