Private Sub SurroundingSub() Dim displayList As ObservableCollection(Of RootNameList) = New ObservableCollection(Of RootNameList)() Dim hostGroupList As ObservableCollection(Of HostGroup) = New ObservableCollection(Of HostGroup)() Dim res = JToken.Parse(json).ToString() Dim zabbixResult As List(Of HostDetail) = (JsonConvert.DeserializeObject(Of ZabbixResult)(res)).result Dim newGroupList = ((zabbixResult.SelectMany(Function(x) x.groups, Function(hostName, groupName) New With {Key .name = hostName.name, Key .groupName = groupName.name }).ToList().GroupBy(Function(x) x.groupName))).ToList() Dim newCompareList = (zabbixResult.SelectMany(Function(x) x.groups, Function(hostName, groupName) New With {Key .name = hostName.name, Key .groupName = groupName.name })).ToList() For i As Integer = 0 To newGroupList.Count() - 1 Dim grpname As String = newGroupList(i).Key Dim hstnm As ObservableCollection(Of HostName) = New ObservableCollection(Of HostName)() For j As Integer = 0 To newCompareList.Count() - 1 If grpname = newCompareList(j).groupName Then hstnm.Add(New HostName With { .Host = newCompareList(j).name }) End If Next hostGroupList.Add(New HostGroup With { .GroupName = grpname, .Host = hstnm }) Next displayList.Add(New RootNameList With { .RootSubnet = "Root Subnet", .HostGroupName = hostGroupList }) End Sub