Data Sorter

Input Data (JSON Array)

Sort Rules

Example Input

[
  {
    "id": 3,
    "name": "Product C",
    "category": "Electronics",
    "price": 499.99,
    "lastUpdated": "2024-02-01"
  },
  {
    "id": 1,
    "name": "Product A",
    "category": "Books",
    "price": 19.99,
    "lastUpdated": "2024-01-15"
  },
  {
    "id": 2,
    "name": "Product B",
    "category": "Electronics",
    "price": 299.99,
    "lastUpdated": "2024-01-20"
  }
]

Example Sort Rules:

  • Sort by category (ascending, text) then price (descending, number)
  • Sort by lastUpdated (ascending, date)
  • Sort by name (ascending, text)
  • Sort by id (ascending, number)