How can I replace this in jQuery?
I have the following element:

    <span data-valmsg-for="Company.People[0].Name" />

What I would like to do, is take the 'data-valmsg-for' attribute and format it to look like this:

var idToLocate = "Company.People_0__Name"

How can I accomplish this with jQuery?




How can I replace this in jQuery?
===

I have the following element:

    <span data-valmsg-for="Company.People[0].Name" />

What I would like to do, is take the 'data-valmsg-for' attribute and format it to look like this:

var idToLocate = "Company.People_0__Name"

How can I accomplish this with jQuery?



