JSFiddle - React, Tailwind, and code Playground

by orolo

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">

JavaScript

myArray = {"original" : undefined };

newStuff = {"item" : "theValue", "item2": "anotherValue"};

combo = $.extend(myArray.original, newStuff);

$.each(combo, function(index, value) {
    $("body").append(index + " : " + value + "<br>");    
});

//i want the array to be
// {"original": {item : theValue, item : anotherValue}}