Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tMatch='key1="false" key2="Group 1"';
- var key1;
- var key2;
- tMatch.split(' ').forEach(function(x){
- var arr = x.split('=');
- if (arr[1]){
- if (arr[0]=='key1'){
- key1=arr[1];
- }else if (arr[0]=='key2'){
- key2=arr[1];
- }
- }
- });
- alert('key1:'+key1);
- alert('key2:'+key2);
- "Group
- "Group 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement