If I do:
var representante = $("#representante").attr(“ms-data”);
I get the name of the field and not the data inside the field.
I found the solution!
How to access member information with JS
// do things with the member object
// member’s specific page if set.
// check if member is logged in
member.loggedIn // returns true or false
Thanks for sharing the solution