Answers for "how to explode a string in javascript"

2

js explode equivalent

//Loading the variable
var mystr = '0000000020C90037:TEMP:data';

//Splitting it with : as the separator
var myarr = mystr.split(":");

//Resulting array structure
myarr = ['0000000020C90037', 'TEMP', 'data'];
Posted by: Guest on September-23-2020
0

explode array inside string javascript

var getValue = '["1","2"]';
var obj = JSON.parse(getValue) //obj is now ["1", "2"]
Posted by: Guest on May-12-2021

Code answers related to "how to explode a string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language