0

here is what i am trying to do

CMP

<aura: attribute name= "list" type=CustomObj[]/>

Controller

var list = component.get("v.list");
var FinalList=[];
//iterating over list
for (var i in list){
If (list[i].Name==``){
FinalList.push(list[i]);
Console.log('Current Row', list[i]);// prints proxy {} in console.

}

}

If condition met i just want to access that row & push into another attribute if same type .No idea what I am missing but list[i] doesn't give me row whereas list[i].Field working fine. Need help. Thanks

3

1 Answer 1

1

You can read more about Proxy; it doesn't stop your access, it just makes debugging a little more of an annoyance. As an aside, an easier way to make your list would be as follows:

var finalList = component.get("v.list").filter(row=>(!!row.Name));

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .