Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ob = {};
- $.each( input, function( key, value ) {
- var v = [];
- ob[key] = v.push(value);
- console.log( v );
- console.log( "obj: " + ob );
- console.log( key + ": " + value );
- });
- First input- {A: "34",B: "2"}
- Second input- {A: "21",B: "11"}
- ob = {A: ["34","21"] ,B: ["2","11"]}
Add Comment
Please, Sign In to add comment