Question

How to parse z.request options?

  • 18 November 2021
  • 0 replies
  • 14 views

Hello,

I developed my first private Zap and I would like to parse the input directly

into :

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;

    // You can do any parsing you need for results here before returning them
   
   results.phone=results.phone.replace("+","00");
 

    return results;
  });

 

The line of code :

results.phone=results.phone.replace("+","00");

does not work because  the phone field still contains the plus sign.

 

Any glue?

Thank You


0 replies

Be the first to reply!

Reply