P
pistacchio
hi to all!
i have the following code (i stripped down the code to a short
example, but still it does reproduce the problem):
var objs = new Array();
obj = {
parameter : " "
}
objs[0] = obj;
objs[0].parameter = "apple";
objs[1] = obj;
objs[1].parameter = "banana";
alert(objs[0].parameter);
i create a json object (obj) and insert into 2 items of a previously
created array (objs[0] and objs[1]). inspecting the array, i expect
objs[0].parameter to be "apple", not "banana", which is what i keen on
getting.
any idea?
tia, gustavo
i have the following code (i stripped down the code to a short
example, but still it does reproduce the problem):
var objs = new Array();
obj = {
parameter : " "
}
objs[0] = obj;
objs[0].parameter = "apple";
objs[1] = obj;
objs[1].parameter = "banana";
alert(objs[0].parameter);
i create a json object (obj) and insert into 2 items of a previously
created array (objs[0] and objs[1]). inspecting the array, i expect
objs[0].parameter to be "apple", not "banana", which is what i keen on
getting.
any idea?
tia, gustavo