title: Populate combobox with data from JSON file
body: <p>I am attempting to build what I think should be a relatively simply reader/editor for a very specifically formatted JSON file mostly as a way to prevent users from messing up the syntax.</p>
  
  <p>Json format is:</p>
  
  <pre><code>"Items": {
  "defaultActionClass": "Weaponclass",
  "ItemObjects": [
    {
      "Id": "M16",
      "Name": "EM16",
      "Description": "Some Description",
      "Icon": "Icons/pictures/1.png",
      "AnimationSet": "Set1",
      "Type": "Weapon",
      "EquipmentClass": "Hands",
      "SlotsCount": 2,
      "Weight": 1,
      "AP": 1,
      "BurstFire": 1,
      "AutoFire": 0,
      "EffectiveRange": 8.0,
      "MuzzleVelocity": 2.5,
      "BaseAccuracy": 100.0,
      "Mobility": 6.0,
      "Damage": 30,
      "DamageFalloff": 30,
      "AmmoClips": [
        "AmmoClip556NATOx30"
      ]
    },
  </code></pre>
  
  <p>I can read in the string, that's not an issue, what I am struggling with are the following two items.</p>
  
  <p>Found a way to get the ID's using the following code:</p>
  
  <pre><code>Dim root As RootObject = JsonConvert.DeserializeObject(Of RootObject)(strjson)
  Dim ID As List(Of String) = root.Items.ItemObjects.Select(Of String)(Function(tp) tp.Id).ToList()  
  </code></pre>
  
  <p>That returns all 60 ID's in the list, now my challenge is getting that list into the combobox.  I know I have done this before with other items but this one continues to elude me.</p>
  
  <p>Smooth overthinking the combobox piece.</p>
  
  <pre><code>cmbWeaponID.DataSource = ID
  </code></pre>
  
  <p>Ok, now to figure out how to grab the rest of the data from each ID on the SelectedIndexChanged for the combo box and import it into different text boxes.</p>
  
  <p>Managed to get that going as well with the following code:</p>
  
  <pre><code>        Dim o As JObject = JObject.Parse(strjson)
      Dim Type As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Type"))
      Dim Name As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Name"))
      Dim Description As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Description"))
      Dim Icon As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Icon"))
      Dim AnimationSet As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].AnimationSet"))
      Dim SlotsCount As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].SlotsCount"))
      Dim Weight As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Weight"))
      Dim APCost As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].AP"))
      Dim BurstFire As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].BurstFire"))
      Dim AutoFire As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].AutoFire"))
      Dim EffectiveRange As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].EffectiveRange"))
      Dim MuzzleVelocity As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].MuzzleVelocity"))
      Dim BaseAccuracy As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].BaseAccuracy"))
      Dim Mobility As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Mobility"))
      Dim Damage As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].Damage"))
      Dim DamageFalloff As String = CStr(o.SelectToken("Items.ItemObjects[" &amp; cmbWeaponID.SelectedIndex &amp; "].DamageFalloff"))
  </code></pre>