mikestead / hx-yaml

A cross-platform YAML 1.2 parser & renderer for Haxe.
MIT License
75 stars 28 forks source link

[Feature request] `TObjectMap`: implement the `KeyValueIterator` protocol #27

Open cedx opened 4 years ago

cedx commented 4 years ago

It would be cool if we could iterate over the keys and values:

import yaml.Yaml;
import yaml.util.ObjectMap.AnyObjectMap;

final yaml: AnyObjectMap = Yaml.read("path/to/file.yaml");
for (key => value in yaml) { ... }

See: https://api.haxe.org/KeyValueIterator.html