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

Map to object broken? #3

Closed
alexkli opened this issue Sep 3, 2019 · 3 comments

Comments

@alexkli
Copy link

commented Sep 3, 2019

Nice tool - but I cannot get map to object work in a useful way. I tried to reproduce the issue using your example:

https://transform.isthe.link/?ignore=Produce&splitter=%09&ignore=%2F%5Cd.%5Cd%5Cd%2F&strip=-%7C%5C%28%5Cd%5C%29&trim=null&dropEmpty=null&map=artist%2C+title

and this text:

2.12 -Huey Lewis & The News     The Power of Love
Producer - Huey Lewis & The News
3:52
2.12 -Joe Walsh     Life's Been Good
Producer - bill ssss
4:39

I get this:

{
  "artist": [],
  "title": [
    "3:52"
  ],
  "undefined": [
    "4:39"
  ]
}

Looks like map to object doesn't detect the (repeating) child arrays... when I first tried it on the weekend it seemed to work fine.

@remy

This comment has been minimized.

Copy link
Owner

commented Sep 4, 2019

Acknowledged. I changed how the rules stack so I suspect it's that.

@remy

This comment has been minimized.

Copy link
Owner

commented Sep 4, 2019

That's fixed.

There was also a few problems with your source content (or github swapped the tabs for spaces) and the strip matcher was a bit wrong.

Should work with this: https://transform.isthe.link/?ignore=Produce&splitter=%09&strip=%2F%28%5Cd.%5Cd%5Cd%29%7C-%2F&trim=null&dropEmpty=null&map=artist%2C+title

Plus source:

2.12 -Huey Lewis & The News	The Power of Love
Producer - Huey Lewis & The News
3:52
2.12 -Joe Walsh	Life's Been Good
Producer - bill ssss
4:39

@remy remy closed this Sep 4, 2019

@alexkli

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

Thanks, confirmed! I had to copy your example from the screenshot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.