private TestCase GetRelationsOfType(JToken relations, string relationType, int urlId, TestCase res) { foreach (var relation in relations) { if (relation["rel"].ToObject <string>() == relationType) { res.AddUrl(relation["attributes"]["name"].ToObject <string>(), relation["url"].ToObject <string>(), urlId); } } return(res); }