title: How to use a string value in run time in SelectToken JSONPath query
body: <p>I have the following code and I am using popular Newtonsoft library in C#</p>
  
  <pre><code>string json = {
    "students": [
      {
        "name": "student 1",
        "grades": [
          {
            "subject1": "A",
            "subject2": "B"
          }
        ]
      }
    ]
  }
  
  JObject rootJObject = JObject.Parse(json);
  </code></pre>
  
  <p>I want to pick a particular student object. If I query using JSONPath with literal string like below, I am getting the actual object</p>
  
  <p><code>rootJObject.SelectToken("$.students[?(@.name=='student 1')]");</code></p>
  
  <p>Now If I want to pass the query string in run time, like below</p>
  
  <p><code>string studentName = "student 1";
  rootJObject.SelectToken($"$.students[?(@.name=={studentName})]");</code></p>
  
  <p>It's throwing an exception like <code>"Unexpected character while parsing path query: s"</code></p>
  
  <p>Is it a limitation that we can use literal string only with single quotes in JSONPath query and not a string value in run time?</p>