'JIRA Query Nested issue: This is how my nested query should be , not able to figure the correct method of building JQL

I have Action Item Tickets Project = x, issuetype = ActionItem

But i need Actions items which is liked to Specific Epics issuetype = Epic, labels in (A1,A2)

Only the Action Items with the Epics that have labels = A1 or A2 should be listed. How to achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source