YulianaBoyle Posted January 3 Report Share Posted January 3 Hello community, I would like to clean up the phone numbers I get from my api. I would like to do the cleanup in a code node to test my JavaScript knowledge. But I can’t get any further. I have now written the following script and always get only as a result: null. I’ve already tried what happens when I run the first line through: let phoneNumber = “09585/86756757” || ‘’; Replace. And there I got the phone number cleaned up as a result. But how do I get the phone number of my API in there? Quote Link to post Share on other sites
Brave_Jan Posted January 3 Report Share Posted January 3 Yes, that’s how it works, but if I want to get the phone number from the api, it doesn’t work. Quote Link to post Share on other sites
AriellaTerry Posted January 3 Report Share Posted January 3 Cleaning up phone numbers from your API sounds like a great idea. One approach you can try is normalizing the phone numbers to a consistent format. You could remove any special characters like dashes or parentheses, and make sure all numbers have the same country code if needed. If you're dealing with international numbers, using a library that supports phone number validation and formatting, like Google's libphonenumber, can really help. Also, verifying phone numbers during registration or sign-up can help weed out incorrect or fake numbers. If you’re interested, you could look into tools like verification phone number for an extra layer of accuracy. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.