on 05-18-2015 1:19 PM
Hello Experts,
at the Moment im trying to copy an entry from an Array which is stored in a JSON Model to another JSON Model (Business Case: Click an Entry on an Table, open a PopUp to change the Values, just change the Values if the user presses the "Change" Button).
But the value is just passed by Reference and not the Value itself, so when i change the Value in the second Model the Value automatically changes in the first model.
Is there any approach to copy values between two JSON models?
Thanks for your Help!
Sascha
Hi,
Use below code to make a copy of the object or array.
tempArr = jQuery.extend({}, orginialArr);
Thanks,
Dheeram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.