Can any one help on this I need a function or a logic which gives expected outpu

Can any one help on this I need a function or a logic which gives expected output from two arrays.
each variable from array1 should map with all variables in array2.
{a,b} {c,d,e} output (a,c)(a,d)(a,e)(b,c)(b,d)(b,e)
{a} {b,c,d} output (a,b)(a,c)(a,d)

Thanks

OriginalPostID-210308

OriginalPostID-210308

  Discussion posts and replies are publicly visible