Skip to content

Multi selecting strings from jsonOptions #122

@Morgensol

Description

@Morgensol

Hi i've been looking through the examples over and over and tested out different combinations but i cannot figure out how to achieve being able to dynamically multi pick through a json file with jsonOptions, as it seems json options does not take variable inputs. Here is an example of json file i want to select data from:

{
    "SomeConfig": [
        "here",
        "there"
    ],
    "SomeOtherConfig": [
        "something",
        "else"
    ]
}

And here is the input example i want to achieve:

{
      "id": "config_pick",
      "type": "command",
      "command": "extension.commandvariable.pickStringRemember",
      "args": {
        "description": "Select Config",
        "debug":true,
        "key": "config_pick",
        "fileName": "${workspaceFolder}/config/config.json",
         "pickStringRemember": {
            "ConfigPick": {
                "description": "Select target distro",
                "key": "distro",
                "options": ["SomeConfig", "SomeOtherConfig"]
            },
        },
        "fileFormat": "json",
        "jsonOption": {
            "label": "content.${pickStringRemember:ConfigPick}[__itemIdx__]",
            "description": "content.${pickStringRemember:ConfigPick}[__itemIdx__]",
            "value": "content.${pickStringRemember:ConfigPick}[__itemIdx__]"
        }
      }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions