Changed callback typedef to id

The result can be either an array or a dictionary.