Get nested value
Retrieves the value of the nested key indicated by the given selector list from a dictionary or list.
- Use
functools.reduce()to iterate over theselectorslist. - Apply
operator.getitem()for each key inselectors, retrieving the value to be used as the iteratee for the next iteration.