From: Josh Cheek Date: 2010-12-06T21:20:38+09:00 Subject: Re: Traverse YAML node tree with non-unique values --0016361e7b0c233b830496bceaca Content-Type: text/plain; charset=ISO-8859-1 On Mon, Dec 6, 2010 at 5:52 AM, Martin C. wrote: > Thanks Josh for the detailed reply. Looking at the YAML in your first > reply though, I have to wonder: You end up with duplicate keys under the > items node, and if you load that with YAML, won't you have the same > problem of only one product and one quantity remaining? > > A key is the name you use to refer to that set of data. Perhaps you mean that I end up with two items, but you will notice they are not accessed by name. Each item is accessed by position rather than key, because it is an Array rather than a Hash, so it does not have the clashing keys problem. --0016361e7b0c233b830496bceaca--