getPosts returns a common-structured array