For example, how can I get the 5th item in one list to match with the 5th item of the other, and then send that result if it matches? Here is an example of what the json will look like:
{
"List1": [
"name1",
"name2",
"name3",
"name4",
"name5",
],
"List2": [
"emoji1",
"emoji2",
"emoji3",
"emoji4",
"emoji5",
]
}
The characters find items in the second list and I need to make it correspond with the proper names in the first list. They are already in the correct order, so the 5th name is the match to the 5th emoji. If it's relevant, I'm using this method of finding the emojis that the player owns:
scan = f"privatelink"
async with aiohttp.ClientSession() as cs:
async with cs.get(scan) as r:
try: Bag = ast.literal_eval(await r.text())
except: Bag = json.loads(await r.text())
And that json looks like this:
[{"emojis":"emoji10,emoji20,emoji11,emoji14,emoji30,,emoji9,emoji44,emoji53,emoji16,emoji48"}]
It looks really weird and I think this might actually be my problem. I don't think I've seen a json like this before and Idk how to parse it.
So let's say I own "emoji5" from the second list. I want to match that to "name5" from the first list. How do I match these results?