Hi,
How can i get a property from an object that is in a for statement? Below is my code and right at the end is how i'm trying to fetch the data. I also need to be able to change the data such as the text in the name object.
var fatData = [ { "name": "Matt", "myLocation" : "IN" }, { "name": "Darby", "myLocation" : "IN" }, { "name": "Terence", "myLocation" : "IN" }, { "name": "Tom", "myLocation" : "OUT" }, { "name": "Chris", "myLocation" : "OUT" } ], thinData = [], item, i = -1; for (var i in fatData){ var row = Ti.UI.createTableViewRow({ className: fatData[i].name, // improves table performance selectedBackgroundColor:'transparent', height:70, width:300 }); var name = Ti.UI.createLabel({ text:fatData[i].name, color:'white', font:{fontSize:18,fontFamily:'HelveticaNeue-Bold'}, left:50 }); row.add(name); thinData.push(row); } var people = Ti.UI.createTableView({ backgroundColor:'transparent', separatorColor:'transparent', data:thinData, top:114, width:300 }); main.add(people); // THIS IS THE BIT I'M GUESSING while( thinData[i] ){ if(thinData[i].row.name.text == user){ alert(thinData[i].row.name.text); } i++; }