title: How to extract all values for all JsonProperty objects with a specified name from a JsonDocument?
body: <p>I have a free-form <a href="https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsondocument?view=netcore-3.1" rel="noreferrer"><code>JsonDocument</code></a> which contains a <code>JsonProperty</code> with name <code>internalName</code>.  My problem is that that I don't have model to parse it into (because there is no predefined JSON schema) and the property can appear at any level, parent, child etc. </p>
  
  <p>How would one go about getting all the <code>JsonElement</code> values for the JSON  property <code>internalName</code>?</p>
  
  <p>What I have tried so far is something like this </p>
  
  <pre><code>    var namesUsedInLayout = Layout.RootElement.EnumerateObject().Where(x =&gt; x.Name == "internalName").Select(x =&gt; x.Value.ToString());
  </code></pre>
  
  <p>This though seem to only provide me the top layer and not the child or the child of child layers. </p>