title: How to pass variable parameters to an XPages SSJS function?
body: <p>If I have a function in SSJS and I want to pass one "firm" parameter and a list of others that can change, what's the best way to do that?  With some kind of hashMap or JSON or something else?</p>
  
  <p>for example given something like:</p>
  
  <p>myfunction( code:string, paramList:??) {
  // do stuff here</p>
  
  <p>}</p>
  
  <p>Basically the function will create a document.  And sometimes I'll have certain fields I'll want to pass in right away and populate and other times I'll have different fields I will want to populate.</p>
  
  <p>How would you pass them in and then parse out in the function?</p>
  
  <p>Thanks!</p>