Can't understand the optimize response section in the HTTP request node

I’m using the HTTP request node to query perplexity via its API. I wanted to pass to the AI agent only the message content and the citations.
So I enabled the Response Optimization switch.

Then, I chose Selected from the Included fields menu and added the following in the field below.

response[0].choices[0].message.content,response[0].citations

The JSON I get from Perplexity is this:

[
  {
    "response": [
      {
        "id": "5a3fb0eb-39ea-4345-a484-675280923994",
        "model": "sonar",
        "created": 1747833805,
        "usage": {
          "prompt_tokens": 32,
          "completion_tokens": 287,
          "total_tokens": 319,
          "search_context_size": "low"
        },
        "citations": [
          "https://www.normattiva.it/uri-res/N2Ls?urn%3Anir%3Astato%3Alegge%3A2018-08-28%3B129",
          "https://www.normattiva.it/uri-res/N2Ls?urn%3Anir%3Apresidente.repubblica%3Adecreto%3A1999-03-08%3B275",
          "https://www.normattiva.it/uri-res/N2Ls?urn%3Anir%3Astato%3Alegge%3A1997-03-15%3B59~art21",
          "https://www.corteconti.it/Download?id=c61e84a4-83a4-4d4e-9af0-bfb7f52eb0e7",
          "https://www.normattiva.it/uri-res/N2Ls?urn%3Anir%3Astato%3Adecreto.legislativo%3A1998-03-06%3B59~art1"
        ],
        "object": "chat.completion",
        "choices": [
          {
            "index": 0,
            "finish_reason": "stop",
            "message": {
              "role": "assistant",
              "content": "{ \"answer\": \"La gestione della contabilità di una scuola autonoma in Italia deve seguire principi e istruzioni generali stabiliti dalla normativa vigente. Il Decreto del 28 agosto 2018, n. 129, stabilisce i principi per la gestione amministrativo-contabile delle istituzioni scolastiche, anche se l'atto non risulta completamente visibile[1]. Inoltre, la Legge 15 marzo 1997, n. 59, sancisce l'autonomia delle istituzioni scolastiche, che include la gestione finanziaria[3]. Per quanto riguarda la contabilità, le scuole autonome sono tenute a rispettare le norme generali sulla contabilità pubblica, ad esempio, il Decreto Legislativo 6 marzo 1998, n. 59, disciplina la qualifica dirigenziale dei capi di istituto, influenzando indirettamente anche la gestione amministrativa[5]. Inoltre, le scuole devono gestire le risorse finanziarie seguendo criteri di trasparenza e correttezza, in conformità alle normative vigenti. \" ,\"citations\": [  ]}"
            },
            "delta": {
              "role": "assistant",
              "content": ""
            }
          }
        ]
      }
    ]
  }
]

But this way I got an empty output.
What am I doing wrong?

Hey @albertocabasvidani

So the “response” key is something which the HTTP tool adds and the actual perplexity response comes without. This means you just need to omit the “response” key in your field and you should be good.

Replace
response[0].choices[0].message.content,response[0].citations
with
choices[0].message.content,citations