How to get UFUNCTION category in C++

Let’s say I’ve got a function like this:

UFUNCTION(Exec, Category = "Foliage")
void AddFoliageVolumes();

I can check easily if it’s executable like this:

UFunction* Function = *FuncIt;
if (Function->HasAnyFunctionFlags(FUNC_Exec))
{
	// Do something
}

But I can’t see to figure out how to get the Category name “Foliage” in such a manner?

Thanks in advance,

Wouter

Solved it:

FName FunctionCategory = FName(*Function->GetMetaData("Category"));