1
I have two objects and wanted to create an array this way =>
[{"loj_codigo":2,"loj_fantasia":"teste 1"},{"loj_codigo":1,"loj_fantasia":"teste 2";}]}
I am receiving the following objects =>
Object {1: "1", 2: "2"}
Object {1: "teste 1", 2: "teste 2"}
What is the relationship between objects? Does it look crossed or is it sequential? Key 1 must be what in the new object?
– Sergio
@Sergio this numeric index there in the objects is correct?
– durtto
@durtto yes, you can use numbers as key/key on objects. It is limited as you cannot do
obj.3 = 'foo';
, in that case it has to be `obj[3] = 'foo';``– Sergio
Code 2 refers to the "test 1" store and code 1 to "test 2"? For the objects you are receiving it is difficult to make this link.
– Waldir J. Pereira Junior