Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var tMatch='key1="false" key2="Group 1"';
  2.  
  3. var key1;
  4. var key2;
  5.  
  6. tMatch.split(' ').forEach(function(x){
  7. var arr = x.split('=');
  8. if (arr[1]){
  9. if (arr[0]=='key1'){
  10. key1=arr[1];
  11. }else if (arr[0]=='key2'){
  12. key2=arr[1];
  13. }
  14. }
  15. });
  16.  
  17. alert('key1:'+key1);
  18. alert('key2:'+key2);
  19.  
  20. "Group
  21.  
  22. "Group 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement