Wednesday, March 6, 2019

Merge 2 Json

How to merge 2 json in javascript

Here is a sample of json merge

var defaults = { validate: false, limit: 5, name: "foo" };
var options = { validate: true, name: "bar" };

// Merge defaults and options, without modifying defaults
var settings = $.extend( {}, defaults, options );

No comments:

Post a Comment