Friends,
I am using 'merge' function in AngularJs in order to update a JSON from another customized:
angular.merge( original, customized );
Original:
{
"CUSTOM_MODULE_CONFIG": {
"CUSTOMER": {
"quickSearch": [
{ ... }
],
"monitors": [
{ ... }
],
"menuNavigation": [
{ ... }
]
}
}}
Customized:
{
"CUSTOM_MODULE_CONFIG": {
"CUSTOMER": {
"menuNavigation": [
{ ... }
]
}
}}
But finally the Original JSON is updated removing "quicksearch" and "monitors" elements. In other examples (without including arrays) the merge function updates the JSON as expected, without removing any element.
How can I preserve all elements in the JSON?
Thanks!