1đź‘Ť
âś…
In your front-end you should return {products: response.message}
because the field called message
have yours “products” list.
or
In your API back-end should be use products
instead of message
to return your “product” list then you could be used as you mentioned.
Source:stackexchange.com