To get the name of a Value object as an std::string, use .getName().str()