Added for loops when looping on key fields of an object.