Add external object to an existing array through a form
I've a table which gets updated based on JSON data.
Each row in the table has a checkbox which holds the value of the corresponding JSON object, which is basically the information about any of the users.
On selecting any of the rows, and saving to display the selected user profile, I'm also storing the selected JSON object in an array 'savedData'.
I also have an option of adding the user externally through a form which pops up on clicking 'Open External form' button. Now, I'm trying to create an object and store it in the same 'savedData' array on submitting that form. At the same time, the 'div.parent' should get generated & get appended to 'div.container' in the same format as it is for the the other users selected from the table.
Unfortunately, the 'div.parent' is not getting created, and the external object is not getting added.
Could you please help me fix this?