Author Topic: How to clone the datamodel into array without effect of datamodel.  (Read 89 times)

maDawi

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to clone the datamodel into array without effect of datamodel. when I change the all value of my array into string, the datamodel value change it too into string. how to fix it thank you.

maDawi

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to clone the datamodel into array without effect of datamodel.
« Reply #1 on: May 11, 2018, 12:06:57 pm »
this problem was fixed thank this is my solution JSON.parse(JSON.stringify(datamodel.data)).