In c# I have one method
public IEnumerable<Office> PointOffices;
private void PrepareMap(IEnumerable<Office> tdMaps)
{
var pointOffices = tdMaps as Office[] ?? tdMaps.ToArray();
if (tdMaps == null || !pointOffices.Any()) return;
PointOffices = pointOffices;
}
In JavaScript I want to get each element of Office and generate different html with attributes of Office class
I tried to do like this
var pointOffices =<%= PointOffices %>;
but it gives me error: Unexpected token ]
Do I need to serialise the class or the method to get it in js ? how can I realize this?