Branch/sublist/subvalues accessor/iterator #4028
Unanswered
Nehemek
asked this question in
Suggestions
Replies: 1 comment
-
I find the very first syntax (being |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is a proposed syntax:
{some_list::*::same_field_available_in_all_elements}
It returns a list of the field requested from all the elements of the list. In case a field doesn't exist in the branch it adds "none" as to not loose the order/total amount of elements. Example of usability:
Data structure:
Get all the names of the clans:
set {_names::*} to {clanData::*::name}
I talked with Snow-Pyon on discord and they suggested it might not be clear that said syntax returns a list and gave some alternatives:
set {_values::*} to branch "attack_speed" of {attributes::*}
Beta Was this translation helpful? Give feedback.
All reactions