Created
March 12, 2012 16:29
-
-
Save nhajratw/2023178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<a> | |
<b>123</b> | |
<b>456</b> | |
<b>789</b> | |
</a> | |
<a> | |
<b>foo</b> | |
</b>bar</b> | |
</a> | |
</root> | |
I want to end up with | |
{[ | |
a: [ b: 123, b: 456, b: 789], | |
a: [ b: foo, b: bar ] | |
]} | |
or something approximately similar. | |
Thanks for the response. I actually don't remember why I wanted this any longer. I know we're continuing to use Jath and it seems to be working fine. It's possible I didn't know what I was doing when I proposed this. :-)
I'll definitely keep your proposal in mind, should I discover a need for it again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm a little confused at your proposed output. It looks like you're going for an array of arrays maybe since it doesn't make sense to have a hash of values having the same key.
You could try this:
Output: