How to handle an API that returns data nested in objects?
For example, in the documentation the shape of the
For a hook such as
categories enddoint is an array of category objects. What if that array is nested inside an object in the response? For example: For a hook such as
useSelect how can I adjust the shape of the object so that the hook understands how to process it correctly?