JSONTools.JSONObjectOLD.SortByType C# (CSharp) Method

SortByType() public method

public SortByType ( ) : List
return List
        public List<JSONAttribute> SortByType()
        {
            List<JSONAttribute> output = new List<JSONAttribute>();
            List<JSONAttribute> deferred = new List<JSONAttribute>();
            foreach (JSONAttribute a in values)
            {
                if (a.Type == JSONType.Object || a.Type == JSONType.ObjectArray)
                {
                    deferred.Add(a);
                }
                else
                {
                    output.Add(a);
                }
            }
            foreach (JSONAttribute d in deferred)
            {
                output.Add(d);
            }
            return output;
        }