Added the key value loop which is the equvalent of the object loop in js should actualy be renamed into that