var person = {
course1:{Name:"xxx", day:"mon", time:"2am-6pm"},
course2:{Name:"yyy", day:"tue", time:"7am-9pm"},
course3:{Name:"zzz", day:"tue", time:"2am-6pm"},
course4:{Name:"aaa", day:"wed", time:"2am-6pm"},
course5:{Name:"bbb", day:"thu", time:"2am-6pm"},
course6:{Name:"ccc", day:"mon", time:"2am-6pm"}
};
Can anyone please show how to loop and iterate through this person object and swap the course1 and course2 object values(name, day, time) and do something, replace it and swap course1 and course3 again do something and so on...