I receive a dictionary with two keys, that has lists of lists as values. Example:
dict = {'points' : [[2,1],[3,4], [5,6],[7,8]], 'ids':[[2], [1], [3], [0]]}
Each point has an id associated with it, ex: point [2,1] has id[2], point[3,4] has id[1] etc .
I need to sort the points in respect to each id. So the ouput I need is something like this
dict = {'points' : [[7,8],[3,4], [2,1],[5,6]], 'ids':[[0], [1], [2], [3]]}
How can I do this?
Thanks.