I have set up my posts with bookmarks where the user's meta will be updated with the post ID of the post they are bookmarking. They are stored in user meta key my-bookmarks
as an array.
Now I am trying to query (using PHP) all of the users that have bookmarked a specific post, and list the counts by state. So 20 people from Wisconsin, 10 people from Florida, etc.
I am wondering if there is an easy way to fetch all of the possible values of the user meta key state
from the users that have bookmarked that post, so I don't have to iterate all 50 states every single time. I would rather see that only users from 3 states have downloaded them, so let's just query the users from those 3 states.
Unless you have a better idea.