'Python Bisect with nested array while still keeping N(log N)

I am trying to to to get get the closest value of the first element of all the lists while still keeping O(log N). I've been searching around to find a method to use nested lists for bisect but can't find anything.

Any help is appreciated and an explanation would be great too.

Example dataset:

data_set = [[1623024000000, 0.10626456313131295], [1623110400000, 0.10626456313131295], [1623196800000, 0.1069195694533269]]

Perhaps I could tweak the way I fetch the dataset, so heres a snippet of it

import requests

data_set = requests.get("APIURL").json()["prices"]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source