How to fill a Select in a Form from a JSON received by a REST-CONNECTOR http call?

Hello,

in Camunda8:

how to display Select values from json received by the Rest API ?

For example:

a REST CONNECTOR calls an http url and gets back a Json like this:
[
{
“id”: 58,
lines”: [
{ “key”: “1”, “value”: “Line_1”},
{ “key”: “2”, “value”: “Line_2”},
{ “key”: “3”, “value”: “Line_3”}
]
}
]

I have a REST CONNECTOR and, in the “Response Mapping”:
={“body” : body}

in the Result Expression:
{
id: response.body.id,
lines:.response.body.lines
}

I also have a form with 2 object: a number-field and a select-list

{ “components”: [

{ “label”: “Id”, “type”: “number”, “id”: “Field_1he5my3”, “key”: “id”, “validate”: { “required”: true } },

{ “values”: [], “label”: “Lines”, “type”: “select”, “id”: “Field_0rprxhu”, “key”: “lines”, “validate”: { “required”: true } } ], “schemaVersion”: 4, “exporter”: { “name”: “Camunda Web Modeler”, “version”: “5b49f8f” }, “type”: “default”, “id”: “prodotti”, “executionPlatform”: “Camunda Cloud”, “executionPlatformVersion”: “1.3” }

When executing I can see the number-field with the value 58 taken from json: “id”: 58,
but i can’t see the Select list filled… it remains empty.

So how to fill a SELECT object using a Rest-Connector calling an http url and receiving a json list of (key,value) ?

thanks.

try removing (…) “values”: , (…)