- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I insert Multiple Values to Associative Array
Hi,
I'm trying to create an array that sets multiple values to one object:
Is there any way to do this? What I'm trying to do is set if users choose "B", then Both "X" and "." get chosen. Can anyone help?
Array = Associative Array( {"A", "B"}, { "X", "X AND ."});
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I insert Multiple Values to Associative Array
You could use a list (or another associative array) as the value
Names Default To Here(1);
aa = Associative Array({"A", "B"}, {"A", {"X", "."}});
show(aa);
aa = .;
aa = Associative Array();
aa["A"] = "X";
aa["B"] = {"X", "."};
show(aa);
aa = .;
aa = [
"A" => "X",
"B" => {"X", "."}
];
show(aa);
-Jarmo
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I insert Multiple Values to Associative Array
You could use a list (or another associative array) as the value
Names Default To Here(1);
aa = Associative Array({"A", "B"}, {"A", {"X", "."}});
show(aa);
aa = .;
aa = Associative Array();
aa["A"] = "X";
aa["B"] = {"X", "."};
show(aa);
aa = .;
aa = [
"A" => "X",
"B" => {"X", "."}
];
show(aa);
-Jarmo