Hi, I’m trying to extract a specific value (“Hi Sam, it’s great to meet you! Let’s get started.”) from a JSON response from Open AI’s API as highlighted below:
{
“object”: “list”,
“data”: [
{
“id”: “msg_fuq0tOUo21E4l8TYACWUyUUn”,
“object”: “thread.message”,
“created_at”: 1720171786,
“assistant_id”: “asst_9lkK5gCe7fNjJwAUzW3EVoUf”,
“thread_id”: “thread_8MejyDdGhbAkSfWhUVboL76W”,
“run_id”: “run_YpAId6xaHZmTn6qaytf8Kvwr”,
“role”: “assistant”,
“content”: [
{
“type”: “text”,
“text”: {
“value”: “Hi Sam, it’s great to meet you! Let’s get started.”,
“annotations”:
}
}
],
“attachments”: ,
“metadata”: {}
},
{
“id”: “msg_Am3Ji5FPeSdEDhiIDQz3lg9E”,
“object”: “thread.message”,
“created_at”: 1720171383,
“assistant_id”: null,
“thread_id”: “thread_8MejyDdGhbAkSfWhUVboL76W”,
“run_id”: null,
“role”: “user”,
“content”: [
{
“type”: “text”,
“text”: {
“value”: “Hi I am Sam.”,
“annotations”:
}
}
],
“attachments”: ,
“metadata”: {}
}
],
“first_id”: “msg_fuq0tOUo21E4l8TYACWVyTUn”,
“last_id”: “msg_Am3Ji5FPeSdEDhiIDQz7fg9E”,
“has_more”: false
}
using the condition in the workflow (attached screenshot). But it keeps outputting “Hi I am Sam.” instead. I’m stuck with this. Can anyone help to point out what am I doing wrong here? Thanks!
PS: I’ve tried all permutations of chaning first and last items, still the same output.