I want it to be in this format, the img_url and claims don’t have to be there but if theres a site where you can do something like that, please share it.
'11eyes':
characters:
- Kusakabe Misuzu
This is how the csv file is formatted, so the ‘11eyes’ goes to the anime section and the ‘Kusakabe Misuzu’ goes to the names section. Sometimes there are multiple characters in a anime thats lists so for every character there is going to be a seperate line on JSON with the character name, I don’t want all the characters to be in one JSON line(Also, if possible I would want to remove the ‘-’).
Is there any website or program that can help me with this?
It looks like this is YAML, not CSV. Here’s a website about that format https://yaml.org/. There’s a list of libraries you can use to parse it. Then it’s just a matter of looping through the entries and outputting several JSON documents, which you might already know how to do.
If you’re ok with loading the whole CSV natively, you could paste it into a YAML to JSON converter. Just use your search engine, or for your convenience, here’s the first result:
A bunch of json, I might just continue from here and log it in a txt file. If anyone finds a better way, please share.
Also, If anyone can tell me how I can make it so only 1 character comes per line and not multiple.
I want it so all the other characters come in seperate lines.
Good progress so far! Here’s some help for the next step. Consider this:
Object.entries(yaml.uwu) is an array
Within the loop you have, value.characters is an array
You’ve shown how to loop over (1). That lets you run a block of code for each entry. The mental leap here is that you can apply the same technique again, on (2). A loop inside a loop. That’ll let you run a block of code for each character.