I have been trying to get current users key value with many different ways, but none of them has worked as I wanted. I need to get current SPUser key (i:0#.w|dev\user) to compare with the key on table.
Closest thing I have at the moment is this example But the problem there is, that it gets users Id and can't get key. Or maybe I missed something, but tried it many ways.
Managed to solve that with following example: passing variable values from c# to javascript using a little C# code.