Click here to Skip to main content
15,886,840 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friends i have this string format
"PO-000074/22,PO-000075/22"

and i want to convert into this format
['PO-000074/22','PO-000075/22']

how i can solve this problem using jquery

What I have tried:

i have tried using sub string but i want in jquery
Posted
Updated 9-Nov-22 0:39am

1 solution

You don't need jQuery - just use the String.prototype.split[^] method.
JavaScript
const input = "PO-000074/22,PO-000075/22";
const output = input.split(",");
console.log("Result", output);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900