cancel
Showing results for 
Search instead for 
Did you mean: 

how to resetChanges of json model

0 Kudos

hello experts

in my project i am binding my smart table to a json model

i need to reset the changes of the user .

is it possible to reset the changes of the json model ?

i tried to save the initial values and reuse them but its not working , they are also changing

how can i proceed

thank youu

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

you have to save a copy of your json data. just assigning to a variable won't give you a copy of json data.

var datacopy=JSON.parse(JSON.stringify(yourinitialjsondata))

Answers (1)

Answers (1)

gwerner
Participant
0 Kudos

Hi abdallah mayssam,

If you have an initial JSONModel you can reload the original set of Data.

This will reset the all changes.

regards.