JSON/q

A JSON-based data access specification

Arguments

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

Query

{
  "join": {
    "into": "ps", 
    "on": "Products", 
    "as": "p", 
    "outer": "left", 
    "by": "c == p.category"
  }, 
  "as": "c", 
  "from": "args[0]", 
  "query": {
    "as": "p", 
    "from": "ps", 
    "select": {
      "category": "c", 
      "productName": "(null == p ? \"(No products)\" : p.productName)"
    }
  }
}

Results

{}