I need to serialise only some fields from Offices, only Name and ID
public IEnumerable<Office> Offices;
public string SerializedPointOffices
{
get { return JsonConvert.SerializeObject(Offices ); }
}
I have one Linq select
IEnumerable<MyObj> offices = GetAllOffices();
var test = offices.Select(t => new { t.OfficeName, t.OfficeID});
How Serialize this test
?
type of test is WhereSelectArrayIterator