Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var jsonPayload =
  2.         {
  3.             "language": "",
  4.             "documents": [
  5.                 {
  6.                     "id": "sample-contract",
  7.                     "name": ""
  8.                 }
  9.             ],
  10.             "status": "DRAFT",
  11.             "type": "PACKAGE",
  12.             "roles": [
  13.                 {
  14.                     "id": "Signer1",
  15.                     "type": "SIGNER",
  16.                     "signers": []/*{
  17.                             "email": "[email protected]",
  18.                             "firstName": "John",
  19.                             "lastName": "Smith",
  20.                             "id": "Signer1"
  21.                         }*/
  22.  
  23.                     //"name": "Signer1"
  24.                 }
  25.             ],
  26.             "name": "Demande de signature(s)"
  27.         }
  28.  
  29. // I add the signers like this
  30.  
  31. usersG.forEach(function(user) {
  32.                     var new_signer = {
  33.                         "email": user.email,
  34.                         "firstName": user.firstname,
  35.                         "lastName": user.lastname,
  36.                         "id": "Signer1",
  37.                         "language": user.language
  38.                     };
  39.  
  40. jsonPayload.roles[0].signers.push(new_signer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement