1👍
✅
Ok, try using the following
# result = <api call>
for i in result["artists"]["items"]:
if "images" in i and i["images"]:
i["images"] = [i["images"][0]]
print result
See if this works.
👤NS0
Source:stackexchange.com