In my array of objects, each object contains another object. I was able to retrieve the value of the supplier's name using the following loop, but it only retrieves the value from one object. I am looking for a way to obtain the supplier's name from all the objects in the array.
this.storage.get("products").then((data)=>{
this.inputRowValues = data[0];
for(let i = 0; i <= data.length; i++){
this.user = this.inputRowValues[0]['species'].id
this.supplier =this.inputRowValues[0]['user'].supplierName
}
0: Object { id: 1559565693469, user: {…}, species: {…} }
1: Object { id: 1559565830396, noofboxes: "1", price: "1", … }
2: Object { id: 1559565855919, user: {…}, species: {…} }