manoj singh

manoj singh

  • 1.6k
  • 142
  • 9.8k

How to Simply Loops in typescript

Dec 5 2018 11:43 PM
I want to remove loops by using linq query. Can anyone help me to do this.
 
for (var a in this.OrderItem) {
for (var b in this.items) {
  if (this.OrderItem[a].ItemId == this.items[b].Id) {
   this.items[b].IsOrderItem = true;
  this.items[b].FinalQuantity = this.OrderItem[a].Quantity;
  this.items[b].OrderItem = this.OrderItem[a].OrderSubItems;
  this.items[b].OrderItemId = this.OrderItem[a].Id;
  break;
}
}
}
 

Answers (3)