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
Code
var value = SP.Taxonomy.currentTerm.get_parent();Code
Even this has failed for me.Code
Is there any other way i can get the parent term using JSOM?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Raghavendar SwaminathanRank #788 · 2.9K reputationPosted May 2, 2018, 7:32 PM EDT
Shail SRank #1,940 · 757 reputationPosted May 3, 2018, 2:17 AM EDT