You have a couple of options.
One is attach data-attributes or id's to elements and fetch them using javascript.
Using razor views:
JS:
$('#someid').data('name')
Or you can render the data directly into a script tag.
Using razor:
var somevar = "@item"
You can also Json.Encode more complex objects.
var somevar = @Html.Raw(Json.Encode(object))