Created
April 30, 2010 18:50
-
-
Save ghinch/385608 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
YUI.use(function (Y) { | |
var a = [ | |
{id : 1, label : "foo", value : "bar"}, | |
{id : 2, label : "baz", value : "boo"} | |
], data; | |
Y.Array.each(a, function (val, index, arr) { | |
if (!data) { | |
data = Y.Object(val); | |
} else { | |
console.log('made it to else'); | |
Y.Object.each(data, function (prop, key, obj) { | |
// not making it here | |
console.log('made it to Object loop'); | |
console.log(key, (val[key] == prop)); | |
}); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment