Guest User

Untitled

a guest
Jan 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. var ob = {};
  2. $.each( input, function( key, value ) {
  3. var v = [];
  4. ob[key] = v.push(value);
  5. console.log( v );
  6. console.log( "obj: " + ob );
  7. console.log( key + ": " + value );
  8. });
  9.  
  10. First input- {A: "34",B: "2"}
  11. Second input- {A: "21",B: "11"}
  12.  
  13. ob = {A: ["34","21"] ,B: ["2","11"]}
Add Comment
Please, Sign In to add comment