Skip to main content
Question

Static dropdown with boolean values


I am trying to create a static dropdown field using key value pairs as described in the documentation using this example

[
  {
    "sample": "1",
    "value": "1",
    "label": "Pork"
  },
  {
    "sample": "2",
    "value": "2",
    "label": "Fish"`
  }
]

The API I am targeting expects a boolean value (true or false) as the response. However, when I try to adapt the above code to include boolean values such as in the following example, I receive an error saying that this does not match any of the available schemes. What can I do about this?

[
  {
    "sample": true,
    "value": true,
    "label": "Pork"
  },
  {
    "sample": false,
    "value": false,
    "label": "Fish"`
  }
]
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.