Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function magic(source, keys) {
- var result = {};
- var tmp = source.toString().substring(1, source.length-1);
- Logger.log(tmp);
- var arr = tmp.split(',');
- Logger.log(arr);
- if(arr && arr.length > 0) {
- arr.forEach(function(arg) {
- var param = arg.split(' ').join('').split('=');
- if(keys.indexOf(param[0]) > -1) {
- result[param[0]] = param[1];
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement