JSON/q

A JSON-based data access specification

Arguments

[
  [
    "Beverages", 
    "Condiments", 
    "Vegetables", 
    "Dairy Products", 
    "Seafood"
  ]
]

Query

{
  "join": {
    "into": "ps", 
    "on": "Products", 
    "as": "p", 
    "by": "c == p.category"
  }, 
  "as": "c", 
  "from": "args[0]", 
  "select": {
    "category": "c", 
    "products": "ps"
  }
}

Results

{}