I have been having trouble with transposing the first column values in the table below:

I want to somehow want the tables to look like this:

Since I have many such tables, I want to do this in jsl. But with the transpose function, I get all the values in 1st column (even the duplicates and the names of that column). Is there any other function I can use or any other way this can be done? Thanks a lot for the help guys!!