Query regarding handling an API response

[
  [
    { key1:value1}.
    { key2:value2}
    { key3:value3}   
 ],
  {anotherKey1: anotherValue1 }
]

Hello,
Mentioned above is the response generated by an API.
While i am trying to handle this response, item[0].json gives me the access to
{ anotherKey1: anotherValue1 }.
Whereas, my main requirement is to be able to handle

[
   { key1:value1}.
   { key2:value2}
   { key3:value3}   
 ]

and more importantly, the ‘value1’ inside this…
Can anyone please help me with this? This is an urgent requirement.

Hm if the response of the API is like you have written above then you should be able to access the whole data with item[0].json. Can not think of a reason why it would do what you described. There must be some kind of different issue or an unknown bug.

Does it display the full data in the Editor-UI? Because what you see in there should be identical to what you can access.

I think the same as what you have replied. But, unfortunately, it is not. I am stuck.
Can this be an issue related to the response handler?

If we script as -

return [items[0]] in the function node

then it returns

[
  [
    { key1:value1}.
    { key2:value2}
    { key3:value3}   
 ]
]

My idea is to iterate over the array of object. While i try to do that, it returns ‘undefined’

Hm return [items[0]] can not work properly. As each item need a “json” property.

You can read about the internal data-structure here:

And general information about the Function-Node here:

Maybe there is simply a misunderstanding of how everything work?

Btw. if you have an example-workflow that shows the problem you have, please share it. I can then have a look.

https://community.n8n.io/uploads/default/original/1X/17ee943ca1cf0f696e74e2250f304627cd8b699c.png

{
  "name": "sample_workflow",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://127.0.0.1:5000/item/alexandro",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        420,
        300
      ]
    },
    {
      "parameters": {},
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        570,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": "2"
}

Sadly does the example workflow not help very much as I can not execute it like that because it contains only two nodes with default settings with a URL set which references your local server.
Additionally, am I very confused as the data structure of your initial post is totally different from what your screenshots show.

So can you please post here the output of the “HTTP Request” node. Then I can simply mock it with a Function-Node. Also please tell me what you want to do exactly. Like how should the data look like after the Function-Node (also post that one here)? And if the data should stay in one item or if it should be split up in different ones to for example add a new row to a Google Sheet for each.

Then I should be able to Function-Node for you to do exactly that.

[
    [
        {
            "GroupNameVersion": "Metallurgy Exam",
            "Exoname": {
                "PersonIdentity": 10217016,
                "ProgramID": 73214614,
                "ProgramPassword": "5QRQ224",
                "ExamName": "Metallurgy",
                "TotalQuestions": 10
            },
            "DateOfStarting": "2020-12-18T00:00:00",
            "DateOfEnding": "2020-17-30T00:00:00"
        },
        {
            "GroupNameVersion": "Pharmco Exam",
            "Assessment": {
                "PersonIdentity": 10217018,
                "ProgramID": 73214614,
                "ProgramPassword": "5123Q224123",
                "ExamName": "Pharmco exam",
                "TotalQuestions": 10
            },
            "DateOfStarting": "2020-12-18T00:00:00",
            "DateOfEnding": "2020-17-30T00:00:00"
        }
    ]
]

Thanks but unless you answer the questions I asked I can sadly not help you