I've been banging my head for seemingly forever trying to get this to work.
I'm working on a jQuery/SPServices web part that rolls up some data on audience targetted library items. Web services do not audience target, so I'm having to roll my own and running into issues.
I'm able to get back a list of audiences from the server via some cutom code and parse that out and push it into an array, userAudArray. In my SPServices GetListItems, I'm able to dump the ows_Audience field into an array, split on ; and grep it so it only
lists the audiences, iAudArray.
I need to do a check to verify that at least 1 GUID in the iAudArray exists in the userAudArray so I can write it to the eventual output. If no GUID from the iAudArray is present in the userAudArray, I need to skip the item.
I've tried seemingly every thing I know of and that I can find on stackoverflow to evaluate if any item in array A exists in array B. Any pointers would be appreciated.