Skip to content

Incoherent processing of nested data with arrays and non-arrays #492

@mebibou

Description

@mebibou

There is an incoherent processing of the following data:

Case 1:

test.id,test.values.value,test.values.0.id
1,foo,bar

which converts to:

[
  {
    "test": {
      "id": "1",
      "values": {
        "0": {
          "id": "bar"
        },
        "value": "foo"
      }
    }
  }
]

Case 2:

test.id,test.values.0.id,test.values.value
1,bar,foo

which converts to:

[
  {
    "test": {
      "id": "1",
      "values": [
        {
          "id": "bar"
        }
      ]
    }
  }
]

Those 2 CSV are basically the same, I only inverted column 2 and 3, and it gives different result. It seems because the array is parsed first, test.values.value is simply being ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions