Question

Static dropdown with boolean values

  • 28 July 2021
  • 0 replies
  • 130 views

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"`
}
]

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.