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
- Dyn365CE15 May 2024Environment settings behavior (Preview) feature in Model-driven Apps
- Dyn365CE14 May 2024Error while connecting to Dataverse environment in XrmToolBox
- Dyn365CE8 May 2024Power Fx Formula Columns in Microsoft Power Apps
- Dyn365CE7 May 2024How to Enable 2024 Release Wave 1 Updates in the Microsoft Dynamics 365 CE Environment?