There is a string like this :
"{tagName=input, type=radio,}, {}, {tagName=input, type=radio, labelName=option31}"
How can I pickup 3 objects in that ?
thank you for help !
There is a string like this :
"{tagName=input, type=radio,}, {}, {tagName=input, type=radio, labelName=option31}"
How can I pickup 3 objects in that ?
thank you for help !
you can split this text like this:
var text = "{tagName=input, type=radio,}, {}, {tagName=input, type=radio, labelName=option31}";
text = text.replace(/}/g,"}}");
var res = text.split("},");
First line is used for add a "}" at the end of each object you want for do the split without problems like the comma at the end of the first object you want.
Then, in res you have an array with the three objects you want
Regards.