Get value from a Json string
<p>I have a Json sting like </p>

<pre><code>var Result= [{"CompanyID":32,"Roles":["Admin"]}]
</code></pre>

<p>I need to get the value of CompanyID from this.</p>

<p>I tried something like</p>

<pre><code>var obj = JObject.Parse(Result);
int Id=obj["CompanyID"];
</code></pre>

<p>but it throwing some error "Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1."</p>

<p>can anyone help</p>

<p>thanks in advance for help .</p>