If you want to check if the data returned by our service is an Array or a simple object we can use the Array.isArray(**) function Example : here we added [data] when the service returns an object to make sure that we are affecting an array to our dataSource
(SOLVED) How to check if subscribed data is an Array of object or an object ?
En Lire Plus →