title: JObject Parse Data with a variable as the value
body: <p>I am trying to decipher the correct syntax for using JObject Parse when I need to have one of the values set by a variable. This is for using Algolia to push a new object to my search index.</p>
  
  <pre><code>songIndexHelper.PartialUpdateObject(JObject.Parse(@"{""ApprovalFL"":"true",
                          ""objectID"":"'+Accepted.Value+'"}"));
  </code></pre>
  
  <p>I receive <code>Accepted.Value</code> from my function argument. For example, Accepted.Value could equal something like 98. Also, <code>true</code> should be formatted as boolean instead of a string. The above is my attempt. How should I fix my syntax?</p>
  
  <p>I'm following this documentation from Algolia: <a href="https://www.algolia.com/doc/api-reference/api-methods/partial-update-objects/" rel="nofollow noreferrer">https://www.algolia.com/doc/api-reference/api-methods/partial-update-objects/</a></p>
  
  <p>For more context, here is the above line in the function:</p>
  
  <pre><code>public ActionResult Index(int? Accepted, int? Denied)
  {
      var accountInfo = EntityDataAccess.GetAccountInfoByUserID(User.Identity.GetUserId());
      if(accountInfo == null || accountInfo.AdminFL == false || accountInfo.LabelFL == true)
      {
          return RedirectToAction("Index", "Home");
      }
      else
      {
          if(Accepted != null)
          {
              EntityDataAccess.AcceptSong(Accepted.Value);
              var songIndexHelper = HttpContext.Application.Get("SongIndexHelper") as IndexHelper&lt;SongAlgoliaModel&gt;;
              songIndexHelper.PartialUpdateObject(JObject.Parse(@"{""ApprovalFL"":""true"",
                                      ""objectID"":""Accepted.Value""}"));
          }
  </code></pre>