# How to get the taskTodoList from the response body

**URL:** <https://forum.camunda.io/t/how-to-get-the-tasktodolist-from-the-response-body/51773>\
**Category:** Camunda 8 Topics\
**Tags:** dmn-engine-feel, zeebe\
**Created:** [April 12, 2024, 3:34am UTC](https://forum.camunda.io/t/how-to-get-the-tasktodolist-from-the-response-body/51773 "2024-04-12T03:34:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skayliu](https://forum.camunda.io/user_avatar/forum.camunda.io/skayliu/32/22778_2.png) [@skayliu](https://forum.camunda.io/u/skayliu)\
**Post date:** [April 12, 2024, 3:34am UTC](https://forum.camunda.io/t/how-to-get-the-tasktodolist-from-the-response-body/51773/1 "2024-04-12T03:34:44Z")

</div>

When use the REST connector to call a service, i got the response like below.  
Now i need to extract the `taskTodoList` into an array to the result expression, What should i do? the `RETURN_DATA` is a escaped JSONObject.

The `taskTodoList` will be used for another service task’s input variables.

```auto
{
    "status": 200,
    "headers": {
        "date": "Fri, 12 Apr 2024 01:29:49 GMT",
        "server": "nginx",
        "transfer-encoding": "chunked",
        "x-content-type-options": "nosniff",
        "x-xss-protection": "1; mode=block",
        "x-frame-options": "SAMEORIGIN",
        "content-type": "application/json;charset=utf-8",
        "connection": "keep-alive",
        "strict-transport-security": "max-age=172800; includeSubDomains"
    },
    "body": {
        "RESPONSE": {
            "RETURN_CODE": "S",
            "RETURN_DATA": "{\"taskTodoList\":[{\"activityDefId\":\"obj_ca954d098ba000018cd81cfdc2602910\",\"activityDefName\":\"startTask\",\"activityModelExt\":{\"customUniqueId\":\"\",\"extendProperty\":\"\",\"id\":\"obj_ca954d098ba000018cd81cfdc2602910\",\"name\":\"startTask\",\"no\":1,\"sequential\":-1},\"activityType\":\"userTask\",\"async\":false,\"beginEngineNode\":\"2406:440:600::16e0:10018\",\"beginTime\":1712885389000,\"claimResourceId\":\"\",\"claimType\":0,\"controlState\":\"active\",\"customUniqueId\":\"\",\"delayTimes\":0,\"delegateUser\":\"\",\"dispatchId\":\"4a9cf601-b664-4cda-8581-ead5814ac6a0\",\"eAITask\":false,\"ext1\":\"\",\"ext2\":\"\",\"ext3\":\"\",\"ext4\":\"\",\"ext5\":\"\",\"ext6\":\"\",\"ext7\":0,\"ext8\":0.0,\"historyTask\":false,\"iOBD\":\"\",\"iOC\":\"\",\"iOR\":\"\",\"iOS\":\"\",\"id\":\"2c8eebfa-7f16-4c14-8f70-bd660d65e510\",\"monitor\":false,\"owner\":\"admin\",\"ownerDepartmentId\":\"5bc3a2dc-3bd2-4376-bcc3-5612e28e55fe\",\"ownerName\":\"admin\",\"parentTaskInstId\":\"00000000-0000-0000-0000-000000000000\",\"priority\":1,\"processDefId\":\"obj_1b01dfade2fd4c408f6426ee290743d0\",\"processDefVerId\":\"obj_1b01dfade2fd4c408f6426ee290743d0\",\"processGroupId\":\"obj_f953af04fb5944ca8128e262d363f62c\",\"processInstId\":\"e4710d5c-9078-4a47-8868-4d43805d5d23\",\"readState\":0,\"remindTimes\":0,\"root\":true,\"scopeId\":\"00000000-0000-0000-0000-000000000000\",\"securityLevel\":0,\"state\":1,\"target\":\"admin\",\"targetCompanyId\":\"8911e732-b42a-4556-853f-ad32761bcbee\",\"targetDepartmentId\":\"5bc3a2dc-3bd2-4376-bcc3-5612e28e55fe\",\"targetName\":\"admin\",\"targetRoleId\":\"d102c89d-55f3-4865-9d5c-c00b7f47b803\",\"targetRoleNo\":\"\",\"taskInfo\":\"\",\"title\":\"Test Zeebe Rest connector\",\"trash\":true}],\"processInstId\":\"e4710d5c-9078-4a47-8868-4d43805d5d23\"}",
            "RETURN_DESC": "sucess",
            "RETURN_STAMP": "2024-04-12 09:29:49:022"
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![nathan.loding](https://forum.camunda.io/user_avatar/forum.camunda.io/nathan.loding/32/24171_2.png) [@nathan.loding](https://forum.camunda.io/u/nathan.loding)\
**Post date:** [April 12, 2024, 11:49am UTC](https://forum.camunda.io/t/how-to-get-the-tasktodolist-from-the-response-body/51773/2 "2024-04-12T11:49:23Z")

</div>

Hi @skayliu - there isn’t a FEEL equivalent of `JSON.parse`, so I think the only option is an additional script or service task that can parse the value and return it. Or use another API in the middle (REST Connector calls your API, your API transforms the response and returns it to Zeebe).

FEEL is part of the DMN spec; if you have any ideas on how the parsing could be implemented in the spec, you can submit a suggestion for DMN here: [OMG Bug/Issue Reporting Form - OMG Issue Tracker](https://issues.omg.org/issues/create-new-issue)

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [July 11, 2024, 11:50am UTC](https://forum.camunda.io/t/how-to-get-the-tasktodolist-from-the-response-body/51773/3 "2024-07-11T11:50:10Z")

</div>

Closed on July 11, 2024, 11:50am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
