using System;
using System.Linq;
using System.Collections.Generic;
public class Test
{
class Data {
public int index;
public string[] types;
}
public static void Main()
{
List<Data> dataList = new List<Data>();
dataList.Add(new Data(){index = 1, types = new string[]{"street_number", "tits_size"}});
dataList.Add(new Data(){index = 2, types = new string[]{"route", "ass_size"}});
dataList.Add(new Data(){index = 3, types = new string[]{"street_number"}});
dataList.Add(new Data(){index = 4, types = new string[]{"locality"}});
var neededData = dataList.Select(d=>d).Where(data => data.types.Contains("street_number"));
foreach(var data in neededData)
{
Console.WriteLine(data.index);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CgljbGFzcyBEYXRhIHsKCQlwdWJsaWMgaW50IGluZGV4OwoJCXB1YmxpYyBzdHJpbmdbXSB0eXBlczsKCX0KCQoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCUxpc3Q8RGF0YT4gZGF0YUxpc3QgPSBuZXcgTGlzdDxEYXRhPigpOwoJCQoJCWRhdGFMaXN0LkFkZChuZXcgRGF0YSgpe2luZGV4ID0gMSwgdHlwZXMgPSBuZXcgc3RyaW5nW117InN0cmVldF9udW1iZXIiLCAidGl0c19zaXplIn19KTsKCQlkYXRhTGlzdC5BZGQobmV3IERhdGEoKXtpbmRleCA9IDIsIHR5cGVzID0gbmV3IHN0cmluZ1tdeyJyb3V0ZSIsICJhc3Nfc2l6ZSJ9fSk7CgkJZGF0YUxpc3QuQWRkKG5ldyBEYXRhKCl7aW5kZXggPSAzLCB0eXBlcyA9IG5ldyBzdHJpbmdbXXsic3RyZWV0X251bWJlciJ9fSk7CgkJZGF0YUxpc3QuQWRkKG5ldyBEYXRhKCl7aW5kZXggPSA0LCB0eXBlcyA9IG5ldyBzdHJpbmdbXXsibG9jYWxpdHkifX0pOwoJCQoJCXZhciBuZWVkZWREYXRhID0gZGF0YUxpc3QuU2VsZWN0KGQ9PmQpLldoZXJlKGRhdGEgPT4gZGF0YS50eXBlcy5Db250YWlucygic3RyZWV0X251bWJlciIpKTsKCQkKCQlmb3JlYWNoKHZhciBkYXRhIGluIG5lZWRlZERhdGEpCgkJewoJCQlDb25zb2xlLldyaXRlTGluZShkYXRhLmluZGV4KTsKCQl9Cgl9Cn0=