Creating Categories and Subcategories with MIGX

Summary

Hey all, I have a MIGX TV with four fields. The first field is a category dropdown, and the second I want to be a sub category dropdown based on the selection in the first.

Step to reproduce

Does anyone know how to produce this? I heard somewhere that you can extend MIGX with JS, is that correct?

This is the extract from Form Tabs to show what I have currently.

[
  {
    "caption": "Product Entry",
    "fields": [
      {
        "field": "category",
        "caption": "Category",
        "inputTVtype": "listbox",
        "inputOptionValues": "Lifting Equipment==Lifting Equipment||Height Safety==Height Safety||PPE==PPE"
      },
      {
        "field": "subcategory",
        "caption": "Subcategory",
        "inputTVtype": "text"
      },
      {
        "field": "item",
        "caption": "Item Name",
        "inputTVtype": "text"
      },
      {
        "field": "image",
        "caption": "Image",
        "inputTVtype": "image",
        "default": "assets/images/template/missing-image.png"
      }
    ]
  }
]

Environment

Modx 2.8.4
Migx 3.0.0

Maybe this older topic helps: