Skip to content

Instantly share code, notes, and snippets.

@scarabaeus
Created February 1, 2023 20:06
Show Gist options
  • Select an option

  • Save scarabaeus/06ceb15f71ee57238b2a1847405d9a9a to your computer and use it in GitHub Desktop.

Select an option

Save scarabaeus/06ceb15f71ee57238b2a1847405d9a9a to your computer and use it in GitHub Desktop.

Revisions

  1. scarabaeus created this gist Feb 1, 2023.
    73 changes: 73 additions & 0 deletions Example Data
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    {
    "Account": {
    "Account Name": "Firefly",
    "Order": [
    {
    "OrderID": "order103",
    "Product": [
    {
    "Product Name": "Bowler Hat",
    "ProductID": 858383,
    "SKU": "0406654608",
    "Description": {
    "Colour": "Purple",
    "Width": 300,
    "Height": 200,
    "Depth": 210,
    "Weight": 0.75
    },
    "Price": 34.45,
    "Quantity": 2
    },
    {
    "Product Name": "Trilby hat",
    "ProductID": 858236,
    "SKU": "0406634348",
    "Description": {
    "Colour": "Orange",
    "Width": 300,
    "Height": 200,
    "Depth": 210,
    "Weight": 0.6
    },
    "Price": 21.67,
    "Quantity": 1
    }
    ]
    },
    {
    "OrderID": "order104",
    "Product": [
    {
    "Product Name": "Bowler Hat",
    "ProductID": 858383,
    "SKU": "040657863",
    "Description": {
    "Colour": "Purple",
    "Width": 300,
    "Height": 200,
    "Depth": 210,
    "Weight": 0.75
    },
    "Price": 34.45,
    "Quantity": 4
    },
    {
    "ProductID": 345664,
    "SKU": "0406654603",
    "Product Name": "Cloak",
    "Description": {
    "Colour": "Black",
    "Width": 30,
    "Height": 20,
    "Depth": 210,
    "Weight": 2
    },
    "Price": 107.99,
    "Quantity": 1
    }
    ]
    }
    ]
    }
    }
    31 changes: 31 additions & 0 deletions JSONata-MUI RadioGroup
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    {
    "type": "FormControl",
    "props": {},
    "children": [
    {
    "type": "FormLabel",
    "props": {
    "id": "demo-radio-buttons-group-label"
    },
    "children": ["Products"]
    },
    {
    "type": "RadioGroup",
    "props": {
    "aria-labelledby": "demo-radio-buttons-group-label",
    "defaultValue": "female",
    "name": "radio-buttons-group"
    },
    "children": [
    Account.Order.Product.{
    "type": "FormControlLabel",
    "props": {
    "value": ProductID,
    "label": `Product Name`,
    "control": "<Radio />"
    }
    }
    ]
    }
    ]
    }