I'm trying to see if I can query the wordpress API to get all of the items in the menu of the site using Javascript.
I can see that there is a post here on how to do this in php but I don't know how to translate this to javascript as it seems to be using the internal wordpress PHP API.
There is a great library here and I can see that with the following code I can query the site:
var site = Site('<id>', WPCOM);
site.get(function(err, info){
// `info` data object
});
But I don't know how to query the menu items or if this is at all possible?
Any help would be appreciated.