#How to handle multiple of multiple [[ids], [ids], [ids]] in django?
6 messages · Page 1 of 1 (latest)
@hot tiger you can use ids=1,2,3,4,5 and in DRF just split the string ids = ids.split(",") then you will get array of ids so after that just User.objects.filter(id__in=ids)
@shut leaf it's a little tricky, it turned out that the front-end is expecting user[0]=id&user[0]=id&user[1]=id, and want to return different list of user objects from db
Is that a filter? @hot tiger
it's like nested query where i have to get all the users given the user-ids, but the user-ids come in in sub-lists, like [[user-ids], [user-ids]]
You can make a post passing this list as payload and treat this data in the view