Skip to content

Instantly share code, notes, and snippets.

@Carmageddon
Forked from scottbyrns/gist:7510886
Last active December 28, 2015 13:49
Show Gist options
  • Save Carmageddon/7510920 to your computer and use it in GitHub Desktop.
Save Carmageddon/7510920 to your computer and use it in GitHub Desktop.
var planOptions = [
{
group:"MailServices",
plans: [
{
Name: "Exchange",
PlanID: 8446,
PeriodID: 6666,
OptionalResources:
[
{
Name: "Res1",
ID: 123,
MinValue: 0,
MaxValue: 10,
DefaultValue: 5
}
{
Name: "Res2",
ID: 123,
MinValue: 0,
MaxValue: 10,
DefaultValue: 5
}
]
}
]
},
{
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