Verbinden von JSON Objekten mittels DojoMerging JSON objects using Dojo

A simple way to merge JSON objects is to use dojo.mixin():

var jsonObj = {foo:"bar"};
var jsonObjNew = {bar:"foo"};
console.debug(dojo.toJson(dojo.mixin(jsonObj, jsonObjNew)));

The above code will result in {foo:”bar”, bar:”foo”}.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *