added JSON response to save_data, stored ids and updated entries on save