Question

How to parse z.request options?

  • 18 November 2021
  • 0 replies
  • 37 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


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.