Skip to content

Instantly share code, notes, and snippets.

@scottbyrns
Created November 17, 2013 08:36
Show Gist options
  • Save scottbyrns/7510886 to your computer and use it in GitHub Desktop.
Save scottbyrns/7510886 to your computer and use it in GitHub Desktop.
var planOptions = [
{
service:"mail",
plans: [
{
name: "exchange",
plandId: ""
}
]
},
{
service:"backup",
plans: [
{
name: "...",
plandId: ""
}
]
}
]
for ( var i = 0, len = planOptions.length; i < len; i += 1 ) {
var option = planOptions[i];
option.service;
option.plans;
for (var j = 0, jlen = option.plans.length; j < jlen; j += 1) {
option.plans[i].name;
option.plans[i].planId;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment