A lot of customers want a SharePoint global site navigation without to much effort. One way to achieve this is using the REST _api to get the navigation items from Site Settings > Navigation (/_layouts/15/AreaNavigationSettings.aspx). The url to get all of the navigation information in XML format is the following: /_api/navigation/menustate?mapprovidername=’GlobalNavigationSwitchableProvider’.
After some searching I came across a methode suggestion from Vadim Gremyachev on sharepoint.stackexchange.com where we use jQuery.grep()
Add some HTML to store the navigation items: