Edit an object in an array and display updated information
I've an array of objects (myData) which has objects with type "internal" and "external".
I'm creating divs with class="box" out of the objects in array and displaying some information of the corresponding object.
I've an edit button in the div.box, only if my object type ="external".
So, on click of the edit, I want to update the information(company or url) of that object in 'myData' array. Also, in the displayed div I'd then like to display the updated information (calling createDisplay() method again).
How do I achieve this?