I am writing a plugin in which I have a js file. I enqueue it with wp_enqueue_script. In this file I have some functions. The functions are triggered by an onclick event of a button. The button is located on edit post page. Now I need those functions to get post meta of the edited post, modify and save.
Does anyone have any idea how to do it?