I have a sharepoint online sitecollection and have created a termset.
How to get parent taxonomy term from child term using JSOM. I want to get the parent term of a term from the termset that i have fetched. I am using get_parent() but that is not working.
var parent =currentTerm.get_parent();
alert(parent.get_name());
I have even tried the below
var value = SP.Taxonomy.currentTerm.get_parent();
Even this has failed for me.
Is there any other way i can get the parent term using JSOM?