{"a": 1, "b": 2}.each_idx_key_val(F(idx, k, v) echo("[$idx] $k=$v")) # Outputs: "[0] a=1" and on the next line "[1] b=2"