changed resource from a query to a get to see if thats why it is reading the data as an object and not array.