Item Lists node, Split Out Items, Disable Dot Notation setting doesn't work in 1.4.1

Describe the problem/error/question

Item Lists node / Split Out Items / Disable Dot Notation setting doesn’t work (1.4.1)

Please share your workflow

Information on your n8n setup

  • n8n version: 1.4.1
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hey @Nick_K_H,

I might be missing something here but when you say it doesn’t work what do you mean? Looking at your screenshot example it looks to be working as expected as you have not disabled dot notion and your input field is using dot notation. If you enabled the disable option I would expect that to not return anything.

2 Likes

If you enabled the disable option I would expect that to not return anything.

that’s it

now may be I have wrong understanding but for I don’t know what reason I’ve expected while Destination Field Name = categories.content_item the result should be

[
  {
    "categories": {
      "total_count": 3,
      >>>"content_item"<<<: {
        "id": 1
      }
    }
  }
]

instead of

[
  {
    "categories": {
      "total_count": 3
    },
    >>>"categories.content_item"<<<: {
      "id": 1
    }
  }
]

this is not a big deal because I can name the destination field whatever I want and rename it at the next (workaround) step and got what I’ve expected/I need in Split Out Items

My point is that the dot notation has the different behaviour in two basic n8n nodes which was not so obvious for me.

BTW this is also can be considered as funny:

the key dissapears - magic!

(I apologize if it is too informal)

Hey @Nick_K_H,

Now that does look funky, I am not sure why you would want to rename a key to have the same name but we should probably handle that case.

Hey @Jon,

As you can see in my previous reply - I want to put object property named ‘categories.content_item’ into ‘categories’ property of the same object under the ‘content_item’ name. so it is not so synthetic example.

But still why is that?

  • split out items - ‘some.thing’ became some.thing property
  • rename keys - ‘some.thing’ became some : { thing : ... }

Hey @Nick_K_H,

Your screenshot was showing that you were renaming a key but giving it the same name which has caused an issue that should be looked into.

Can you maybe provide a clearer example of what you are trying to do? Maybe show the input json and what you expect the output to look like and we can work it out.

Hey @Jon,

Thanks for your reply! I’ll try to explain.

The main idea of my question is related to some king of architectural/logic behaviour of a system. When I try to solve any problem with existing tools I keep in mind how these tools work.

For example - if I use Rename Keys I know what will happen and I’ll get some predictable result.

[
  {
    "key": "value"
  }
]

Rename key to key_renamed will give the ouput that I can predict:

[
  {
    "key_renamed": "value"
  }
]

The more complicated example:

[
  {
    "parent_object": {
      "child_key": "value"
    }
  }
]

Here I know that if I’ll use the “dot notation” on the child key and rename parent_object.child_key to parent_object.child_key_renamed I’ll get:

[
  {
    "parent_object": {
      "child_key_renamed": "value"
    }
  }
]

The result will not became something like this:

[
  {
    "parent_object": {
    },
    "parent_object.child_key_renamed": "value"
  }
]

And this is predictable and expectable for me.

Ok, now I’ll try to rewrite the start topic example (this was simplified syntechic example) to be a little bit more understandable from the practical poin of view:

[
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2",
      "some_items_i_want_to_split_out_and_give_a_new_name_but_keep_as_a_child_of_parent_item": [
        {
          "id": 1
        },
        {
          "id": 2
        },
        {
          "id": 3
        }
      ]
    }
  }
]

I have a some_content object with two properties and an array of several items. I want to split out this array and keep both properties in splitted out items. So I use Item Lists with Split out items option. At this moment I already know that if I use the “dot notation” I’ll get result similar to results above (like parent_object.child_key).

So I expect, that if I

  • Set Fields To Split Out = some_content.some_items_i_want_to_split_out_and_give_a_new_name_but_keep_as_a_child_of_parent_item and
  • Set Destination Field Name = some_content.some_item_splitted (to keep a name)
  • Plus set Include = All Other Fields and
  • Keep Disable Dot Notation unset

I’ll get the next output:

[
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2",
      "some_item_splitted": {
        "id": 1
      }
    }
  },
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2",
      "some_item_splitted": {
        "id": 2
      }
    }
  },
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2",
      "some_item_splitted": {
        "id": 3
      }
    }
  }
]

But this is wrong expectation from my side and I’ll get:

[
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2"
    },
    "some_content.some_item_splitted": {
      "id": 1
    }
  },
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2"
    },
    "some_content.some_item_splitted": {
      "id": 2
    }
  },
  {
    "some_content": {
      "some_property_1_i_want_to_keep": "some_value1",
      "some_property_2_i_want_to_keep": "some_value2"
    },
    "some_content.some_item_splitted": {
      "id": 3
    }
  }
]

This is confusing to me.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.