I have tried and wondered how I can not do with ExtJs, explain to me with a code block.
In jQuery
console.clear (); Var a = {b: 5, c: 4, o: {l: 2, p: 2}} var b = {k: 4, l: 3, c: 5, o: {m: 2, l: 1 }} Var ex = $ .extend (true, a, b); The console dir (ex)is the output here
ex = {a: {q: 2}, b: 5, c: 5, o: {l: 1, P: 2, m: 2}}Ext apply, if applicable, copy does not work in this way. How can I create output in EXJGS?
Thanks in advance
Deep copying is not supported in Extend in
Ext .apply and
Ext.applyIf , they both function only on the first level of a hash map and will override any embedded arrays or hashes instead of merge.
In fact, Docs clearly tells that Ext.apply is for working on config objects, it is not that it matters but it is only to clarify that this merge utility function Although it is basically if you want to merge only the first level / depth.
Comments
Post a Comment