Skip to content

Instantly share code, notes, and snippets.

@ghinch
Created April 30, 2010 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghinch/385608 to your computer and use it in GitHub Desktop.
Save ghinch/385608 to your computer and use it in GitHub Desktop.
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