So i am trying to get elements in a json listed but i don't know how many there will be, depending on the tag.
i tried this:
tag = "cat"
r = requests.get('https://danbooru.donmai.us/related_tag.json?query=' + tag)
j = json.loads(r.text)
dump = json.dumps(j, indent=2, sort_keys=True)
taglist = []
taglist.append(j["wiki_page_tags"][all][0])
if tag in dump:
print(f"{taglist}")
and i'm trying to get a result that looks like that
tag1
tag2
tag3
sorry for that trash code, thanks for your help