daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Feb 19th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Author: Abhinay Omkar
  2. // Input: "red=123&green=456&blue=789"
  3. // Output: [{key: 'red', value: 123}, {key: 'green', value: 456}, ...
  4.  
  5. var dict = [], i = 0; qparams.split('&').map(function(s) { dict[i] = {}; kv = s.split('='); dict[i].key = kv[0]; dict[i].value = kv[1]; i = i + 1; })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top