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.
![](https://arunpotti.files.wordpress.com/2023/07/image-3.png?w=838)
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
![](https://i0.wp.com/365community.online/wp-content/uploads/nsl_avatars/a2e17abf95b0195b8693d17f58f418f1.png?fit=96%2C96&ssl=1)
Array
Dyn365CE26 July 2024API playground feature not available in Dataverse Accelerator App?
Dyn365CE25 July 2024How to Explore and test Dataverse in the Web API playground (preview)?
Dyn365CE20 July 2024Web resource method does not exist in Dynamics 365 CE
Dyn365CE19 July 2024How to get Environment Variable Value in Dynamics 365 CE using JavaScript?