Passing data back to the server. Constructed the json and the object structure in the backend.
created 2 methods for save and update