...
To extract the useful response message, i.e. "Hi! My name is Claude."
- you would use the JQL query content[0].text
, which selects and extracts text from the string "Hi! My name is Claude."
. Similarly, the query model
would select . First from the root of the document it selects the value of the "content"
field (an array) and selects the object at index 0
; next from that object it selects the "text"
field, resulting in the string we needed.
Similarly, to extract the model used - you would use the JQL query model
. From the root of the JSON document it selects the value of the "model"
field and extract extracts the text from the string , i.e. "claude-3-5-sonnet-20241022"
.