Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatten not working on csv input data #1514

Open
TobyBrull opened this issue Mar 2, 2024 · 0 comments
Open

flatten not working on csv input data #1514

TobyBrull opened this issue Mar 2, 2024 · 0 comments
Assignees

Comments

@TobyBrull
Copy link

TobyBrull commented Mar 2, 2024

I would have expected the following commands to give the same output.

mlr --c2j --from <( echo $'obj.a,obj.b\n1,2' ) flatten
mlr --c2j --from <( echo $'obj.a,obj.b\n1,2' ) cat then flatten
mlr --c2j --from <( echo $'obj.a,obj.b\n1,2' ) cat | mlr -j flatten

The output of the first two commands is:

[
{
  "obj": {
    "a": 1,
    "b": 2
  }
}
]

The output of the last command is:

[
{
  "obj.a": 1,
  "obj.b": 2
}
]

I would have expected the latter in all cases. Am I missing something?

@johnkerl johnkerl self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants