Get the value of active updatemenu button

How can I get which updatemenus button is active, in case of 2 buttons created on the plotly element using updatemenus.
I know this can be done in the plotly_buttonclick even by passing the data to the callback function ( and checking data.active), but I need to access the index of the active button in a completely separate JS function

1 Like