title: Select Property from JArray with Specific Key - VB.Net
body: <p>I have an array of screens and field positions on those screens that I'd like to parse.</p>
  <p>I've tried using <code>SelectToken(&quot;$.[?('Field-1')])</code> and am getting an error that multiple tokens are coming back. I've also attempted different flavors of Linq but can't get anything to cooperate.</p>
  <p>I'm fairly new to .Net and VB and am kind of struggling. I might even be going about this all wrong and there is a better way to handle it. I'm working in UIPath so I only really have some psuedo-code to show.</p>
  <p>Here is some sample JSON. I do have full control over this structure so if there are recommendations for restructuring I'd be happy to entertain them.</p>
  <pre><code>    [
      {
          &quot;Screen-1&quot;: {
              &quot;Field-1&quot;: {
                  &quot;FieldInfo&quot;: {
                      &quot;Row&quot;: 16,
                      &quot;Start&quot;: 17,
                      &quot;Length&quot;: 8,
                      &quot;Validation&quot;: [],
                      &quot;Format&quot;: {}
                  },
                  &quot;TitleInfo&quot;: {
                      &quot;Row&quot;: 16,
                      &quot;Start&quot;: 2,
                      &quot;Length&quot;: 14,
                      &quot;ExpectedValue&quot;: &quot;Field-1&quot;
                  }
              },
              &quot;Field-2&quot;: {
                  &quot;FieldInfo&quot;: {
                      &quot;Row&quot;: 17,
                      &quot;Start&quot;: 17,
                      &quot;Length&quot;: 8,
                      &quot;Validation&quot;: [],
                      &quot;Format&quot;: {}
                  },
                  &quot;TitleInfo&quot;: {
                      &quot;Row&quot;: 17,
                      &quot;Start&quot;: 2,
                      &quot;Length&quot;: 14,
                      &quot;ExpectedValue&quot;: &quot;Field-2&quot;
                  }
              }
          }
      },
      {
          &quot;Screen-2&quot;: {
              &quot;Field-1&quot;: {
                  &quot;FieldInfo&quot;: {
                      &quot;Row&quot;: 2,
                      &quot;Start&quot;: 7,
                      &quot;Length&quot;: 4,
                      &quot;Validation&quot;: [
                          &quot;YES&quot;,
                          &quot;NO&quot;
                      ],
                      &quot;Format&quot;: {}
                  },
                  &quot;TitleInfo&quot;: {
                      &quot;Row&quot;: 2,
                      &quot;Start&quot;: 2,
                      &quot;Length&quot;: 4,
                      &quot;ExpectedValue&quot;: &quot;Field-1&quot;
                  }
              },
              &quot;Field-2&quot;: {
                  &quot;FieldInfo&quot;: {
                      &quot;Row&quot;: 2,
                      &quot;Start&quot;: 16,
                      &quot;Length&quot;: 3,
                      &quot;Validation&quot;: [],
                      &quot;Format&quot;: {}
                  },
                  &quot;TitleInfo&quot;: {
                      &quot;Row&quot;: 2,
                      &quot;Start&quot;: 12,
                      &quot;Length&quot;: 4,
                      &quot;ExpectedValue&quot;: &quot;Field-2&quot;
                  }
              }
          }
      }
  ]
  </code></pre>
  <p>What I'd like to be able to do is select which screen I want to pull from and then from there index into each field I need and grab specific values. This would need to be consumable from Python, C#, and VB.Net but my primary concern is VB.Net at the moment.</p>
  <p><strong>Goal</strong>:</p>
  <pre><code>configData = json.Deserialize
  
  screenConfig = configData.Select(&quot;Screen-2&quot;)
  
  Array ValidationInfo = screenConfig(&quot;Field-1&quot;)(&quot;FieldInfo&quot;)(&quot;Validation&quot;).ToList
  
  -----
  List Contents: YES, NO
  
  </code></pre>
  <p>I have considered changing the structure so that we have a specific field for the screen name and then I think I could get selecttoken for it but I don't really see the value in that. It'd look something like this.</p>
  <pre><code>{
      &quot;Screen&quot;: &quot;Screen-1&quot;,
      &quot;Data&quot;: {
          &quot;Field-1&quot;: {
              &quot;FieldInfo&quot;: {
                  &quot;Row&quot;: 16,
                  &quot;Start&quot;: 17,
                  &quot;Length&quot;: 8,
                  &quot;Validation&quot;: [],
                  &quot;Format&quot;: {}
              },
              &quot;TitleInfo&quot;: {
                  &quot;Row&quot;: 16,
                  &quot;Start&quot;: 2,
                  &quot;Length&quot;: 14,
                  &quot;ExpectedValue&quot;: &quot;Field-1&quot;
              }
          },
          &quot;Field-2&quot;: {
              &quot;FieldInfo&quot;: {
                  &quot;Row&quot;: 17,
                  &quot;Start&quot;: 17,
                  &quot;Length&quot;: 8,
                  &quot;Validation&quot;: [],
                  &quot;Format&quot;: {}
              },
              &quot;TitleInfo&quot;: {
                  &quot;Row&quot;: 17,
                  &quot;Start&quot;: 2,
                  &quot;Length&quot;: 14,
                  &quot;ExpectedValue&quot;: &quot;Field-2&quot;
              }
          }
      }
  }
  </code></pre>