title: JSON assign JObject property name with string variable
body: <p>The name of a property in my JSON object needs to be assigned via a string, how can I do this with a JObject? Or should I just JObject.parse from a string? I'm aware of the .Net Json documentation, however, it is very basic and does not show any examples like below.</p>
  
  <p>Here is what I have now:  </p>
  
  <pre><code>return JObject.FromObject(new { 
  attachment = new { 
      type = "template",
      payload = new {
          template_type = "button",
          text = Title,
          buttons = new {
              type = type,
              Variable1 = Value,
              Variable2 = Payload
          }
      }               
  }
  });
  </code></pre>
  
  <p>Also, if I do it the string.parse way like below, is this the best way to format the string?</p>
  
  <pre><code>JObject.Parse(@"{
      attachment : { 
          type : 'template',
          payload : {
              template_type : 'button',
              text : '"+Title+@"',
                  buttons : [{
                    type : '"+Type+@"',
                    "+Variable1+" : '"+Value+@"',
                    "+Variable2+" : '"+Payload+@"'
                  }]      
          }
      }
  }"
  </code></pre>