FHSSpiritDataControl.DataControlNews.flatDegreeClasses C# (CSharp) Method

flatDegreeClasses() private static method

private static flatDegreeClasses ( Newtonsoft.Json.Linq.JObject jObject ) : string
jObject Newtonsoft.Json.Linq.JObject
return string
        private static string flatDegreeClasses(JObject jObject)
        {
            var query = from resultArray in (JArray)jObject["degreeClass"]

            let resultObject = resultArray as JObject

            select new DegreeClass
            {
                DegClass = (string)resultObject.SelectToken("title")
            };

            DegreeClass[] degreeClasses = query.ToArray();

            string outputString = "";

            foreach (DegreeClass d in degreeClasses)
            {
                outputString += d.DegClass + " ";
            }

            return outputString;
        }