Sort the resources after filtering to assure you get a json array and not object