I have a list with nested items and I want to move values/node from Category1 to Category2 which are at same level. Doing it using a double for loop takes lot of time. How can I simplify and make it fast using LINQ?
foreach (var item in masterlist) {
foreach (var item1 in item.Category1) {
item1.Category1 = item1.Category2;
item1.Category2 = null;
}
}