Save data to MySQL

I see that GoJS get and save data with JSON format.
But my mission must do it on MySQL
So i use ajax to get data from MySQL (a php file will get data and convert it to json format, ajax get this file). It works.
But i dont know how to SAVE data when a node is changed properties or deteled or insert. I need a function or something let me know what changed (what node, what event).
Any idea?
Thank for reading!

A web search found:

I suggest searching the web regarding persisting JSON text to MySQL, either as text or as records.

Thank for your response!
But it not really solve my problem
because your link just say how to insert full tree to mysql, but i already have it on mysql

i mean:
i have a tree on mysql (for example i have 16 records as 16 nodes in this tree)
i can get it and show it as a diagram on html

i edit a node on html (use a div #DataInspector to do that)
so, the prolem is how can i know what node changed, what event…
to edit the specific changed node
if update event: update talet set (new_value) where key=“key_changed”
if remove event: delete from table where key=“key_change”
if create event: insert into table (…) values (…)

Thank for reading!

That’s what the Model Changed listener is for: