So let's say I have a struct like so:
struct Foo {
let value: Int
}
And thus I have a key path defined for \Foo.value
:
let keyPath = \Foo.value
Is there any way to query the text name of a KeyPath at runtime?
I.e. I would like to be able to do something like this:
print(name(of:keyPath)) // prints "value" or "Foo.value"