Question
· Jul 14, 2022

What's the best way to structure a list of tuples for passing into a method?

Let's say I have two lists of connected data where elements of listTwo only make sense if given an item of listOne as context:

listOne = ["A", "B", "C"]

listTwo = ["x", "y", "z"]

Tuples like ("A", "y") and ("C, "x") make sense, but "A" or "x" by themselves don't. I would like to pass in a list of such tuples into a method and have it handle each tuple in the list. So what would be the best way to format them given that ObjectScript does not have specialized tuples? Would it be nested $LISTBUILD lists or something else?

Discussion (1)1
Log in or sign up to continue