I got this returned data (in a variable “curlRet”):
{
"object": "list",
"data": [
{
"id": "msg_12345",
"object": "thread.message",
"created_at": 1711974085,
"assistant_id": "asst_12345",
"thread_id": "thread_12345",
"run_id": "run_12345",
"role": "assistant",
"content": [
{
"type": "text",
"text": {
"value": "Vannevar Bush, considered the *grandfather* of hypertext, proposed the Memex system in 1945, a concept described as a \"memory extender\" for organizing and accessing information efficiently. The Memex, a mechanized private file and library, stored information on microfilm with features like a scanner for input, note-taking capabilities, and associative indexing. Bush aimed to address the expanding scientific information, emphasizing the need for better information access. Although the Memex was not constructed, it laid the groundwork for advanced computing concepts. The Memex discussion sparked interest and inspired future innovators but wasn't fully realized due to technological limitations.",
"annotations": []
}
}
],
"file_ids": [],
"metadata": {}
}
],
"first_id": "msg_12345",
"last_id": "msg_12345",
"has_more": true
}
I used this call to extract the important part:
var:string theNewValue = curlRet.json["data"]["content"][0]["text"][1]["value"];
But the returned value is empty. If I try curlRet.json[“data”] the “text” part is missing.
If I use the same syntax to extract the data from this returned value:
{
"object": "list",
"data": [
{
"id": "msg_12345",
"object": "thread.message",
"created_at": 1711975926,
"assistant_id": "asst_12345",
"thread_id": "thread_12345",
"run_id": "run_12345",
"role": "assistant",
"content": [
{
"type": "text",
"text": {
"value": "Zettelkasten, Objekte, Karten, Boxen, digitale Äquivalente, Methoden, Praktiken, Tools for Thought, Notizen, Produktivität, Niklas Luhmann, Allgemeinplatzbuch, Indexkarten, Organisation, Geschichte.",
"annotations": []
}
}
],
"file_ids": [],
"metadata": {}
}
],
"first_id": "msg_12345",
"last_id": "msg_12345",
"has_more": true
}
my variable curlRet contains “Zettelkasten, Objekte, Karten, Boxen, digitale Äquivalente, Methoden, Praktiken, Tools for Thought, Notizen, Produktivität, Niklas Luhmann, Allgemeinplatzbuch, Indexkarten, Organisation, Geschichte.”
I don’t see the difference between to two JSON strings I pass???