JavaScript NodeList

Seems like you can use the same Array.prototype.slice.call that makes the args array-like object become an array. (See here) var inputs = document.getElementsByTagName(‘input’); var selects = document.getElementsByTagName(‘select’); inputs = Array.prototype.slice.call(inputs); selects = Array.prototype.slice.call(selects); var res = inputs.concat(selects); alert(res.length);

Merge (Concat) Multiple JSONObjects in Java

If you want a new object with two keys, Object1 and Object2, you can do: JSONObject Obj1 = (JSONObject) jso1.get(“Object1”); JSONObject Obj2 = (JSONObject) jso2.get(“Object2”); JSONObject combined = new JSONObject(); combined.put(“Object1”, Obj1); combined.put(“Object2”, Obj2); If you want to merge them, so e.g. a top level object has 5 keys (Stringkey1, ArrayKey, StringKey2, StringKey3, StringKey4), I … Read more