https://discord.gg/botpress logo
#👀feature-requests
Object extraction
# 👀feature-requests
d

dazzling-painting-48341

09/20/2023, 2:30 AM
The following object prototype should and is expected to automatically extract / generate the constructors defined within:
Copy code
{
  "card": [
    {
      "title": "",
      "component": {
        "isComponent": true,
        "component_title": "",
        "code": {
          "type": "string",
          "regex": "/(\\\\\\\\w+)?\\\\\\\\n[\\\\\\\\s\\\\\\\\S]+?\\\\\\\\n/g"
        },
        "updated_at": "timestamp” 
//no explanation on what format it expects and ‘date’ is not a thing anywhere in coding
      },
      "override": {
        "isOverride": true,
        "title": "",
        "code": {
          "type": "string",
          "regex": "/(\\\\\\\\w+)?\\\\\\\\n[\\\\\\\\s\\\\\\\\S]+?\\\\\\\\n/g"
        },
        "updated_at": "datetime"
      }
    }
  ]
}
In addition, the use of variables is so confusing I don’t even know where to begin. Global vars aren’t even accessible. Or worse, some are and some aren’t with zero explanation. The idea of defining workflow vars causes nothing but further dilution as you cannot call global vars from there (which I thought was the entire point of something global) and you have to manually rewrite every global var you want in there. Which then makes duplicates. I think. I’m so utterly confused.