How to sort C# Jobject
<p>In my model I have <code>public JObject GenericData { get; set; }</code> for this property I need to create Jobject in my Controller that will pass data to this property. I have done this but now I need to sort data inside Jobject and I don't know how to do it. There is no sort function for Jobject out of box. 
My code in controller looks like this.</p>

<pre><code>var attributes = _context.AttributeRecords.Include(a =&gt; a.Attribute);
    var queryRecords = attributes.Select(l =&gt; new
        {
            RecordId = l.RecordId,
            ProjectId = l.ProjectId,
            Attribute = l.Attribute.Description,
            Value = l.Value,
            InfoId = l.InfoId
        }).ToList();
        var recordsValues = queryRecords.Where(b =&gt; b.InfoId == i.InfoId).ToList();
        var jObjectValues = new JObject();
        foreach (var n in recordsValues)
        {
            if (n.Value.Contains(","))
            {
                var stringToSplit = n.Value;
                var stringValues = stringToSplit.Split(',');
                List&lt;string&gt; arr = new List&lt;string&gt;();
                var allValues = "";
                foreach (var d in stringValues)
                {
                    var values = await _context.AttributeValues.FirstOrDefaultAsync(v =&gt; v.Key == n.Value);
                    arr.Add(values != null ? values.Description : d);
                    allValues = string.Join(",", arr);
                }
                jObjectValues.Add(n.Attribute, allValues);
            }
            else
            {
                var values = await _context.AttributeValues.FirstOrDefaultAsync(v =&gt; v.Key == n.Value);
                jObjectValues.Add(n.Attribute, values != null ? values.Description : n.Value);
            }
            i.GenericData = jObjectValues;
        }
</code></pre>