Added key-value iteration for Javascript