I have a project that receives data from an external widget, including a reporter's email address.
I've successfully extracted the email and can look up the corresponding user in my Service Desk. However, the user lookup can return multiple accounts with the same email, differentiated by accountType (either 'atlassian' or 'customer').
I need a reliable method to extract the accountId specifically for the account where accountType is 'atlassian'. While the 'atlassian' account often appears as the first element in the web response body, I need a solution that works regardless of the element order. - This is in order to set the reporter field to the correct reporter.
Is it possible to achieve this using advanced branching or another mechanism to iterate through the response body data and filter for the 'atlassian' accountType?