Recently, when I was working on a requirement, got a scenario to convert the number string like the below to Number Array.
let stringOfNumbers = "1,2,3";
Used the below code to convert that Number string to Number Array.
let numberArray = stringOfNumbers.map(x => Number(x));
Click on the link to see the code.
Hope this code helped you to convert the Number string to Number Array.
Please like and share your valuable feedback on this article.
Source link
More About This Author
Array
- Dyn365CE26 April 2024Timeline Highlights (New feature) in Microsoft Power Apps
- Dyn365CE26 April 2024Model-driven App – Cannot “See associate records” option in the sub grid?
- Dyn365CE19 April 2024Bookmark the Important Dynamics 365 URLs
- Dyn365CE19 April 2024How to Remove Email from the Suppression list in Dynamics 365 Customer Insights Journey (Preview feature)