Skip to content

Instantly share code, notes, and snippets.

@Quaker762
Created August 13, 2020 06:04
Show Gist options
  • Save Quaker762/7bfea1e5a6d1fda9e7705bd634fbb6bf to your computer and use it in GitHub Desktop.
Save Quaker762/7bfea1e5a6d1fda9e7705bd634fbb6bf to your computer and use it in GitHub Desktop.
var plan = db.PricingPlanSearch({}).records[2];
var newObj = {"name": "AdditionalIPv4Price","rows": [{"price": 0,"additionalIPv4": "none"},{"price": 10,"additionalIPv4": "1"},{"price": 20,"additionalIPv4": "2"},{"price": 40,"additionalIPv4": "4"},{"price": 80,"additionalIPv4": "8"},{"price": 160,"additionalIPv4": "16"}],"label": "IP Address","fields": [{"enum": [{"label": "None","value": "none"},{"label": "1","value": "1"},{"label": "2","value": "2"},{"label": "4","value": "4"},{"label": "8","value": "8"},{"label": "16","value": "16"}],"name": "additionalIPv4","label": "Additional IPv4","source": "input"},{"name": "price","label": "Price","source": "calculation"}]};
// Something here obviously....
return plan;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment