For one of the Requirements I am working on, I have a choice drop-down in a document library. Basically when a user uploads a document in the library they have to populate the Content type from the drop-down, please see the below screenshot.
What I want to do is the following: 1. I want to get the value from the Content type drop-down and then get its id. IF the user changes the content type selection before clicking on Save, it should account for that and give me the right ID for content type selection.
Then I would like to get the list of content types associated with that Library called "Finance" and get the relevant IDs.
Lastly, I would want to match ID I get from (1) with the ID I Get from (2), if it matches, my script will do something.
I would like to achieve this using JSOM, so if someone knows please help with the code.