- Combine multiple array.
- Retrieve all array child values without the index and with custom separator.
- Order array based on certain rules, like alphabetical, numerical, reverser
- Retrieve certain array child with filter.
So far the workaround is impratical, I have to either loop them or do certain sorcery stunts to get the results I want.
Sorry but I think workarounds are not so impractical. Except for # 3, rest are might be done by two steps - Iterate Array and an Action, as you already knew.
To be noted, kind of # 3 isn't supported by native functions even in general programming languages(though, so easy to be done compared to MD).
Both of # 2 and # 3 are hard to be implemented for general use. It doesn't mean to implementation is so difficult, but there are too many things to be considered when it comes to be a general function.
For an example:
Arrays can having children array or dictionary, so how to handle that? It must be differs to each user's needs, then does it have to be prepared by plenty of options to be fits-all? How to keep it straightforward while so many options have to be applied?
This is why that kinds of things have to be done by custom functions.
If you
really want to do some advanced processing, I'd recommend "
HTTP Shortcut". Quite different from its name, it can be used as an external
JavaScript interpreter(and even more powerful features are integrated) for MacroDroid.
i.e., Process the
parameters sent from MD*, and then
return the result** back to MD.
*:
Yes, you have to invoke HTTP Shortcut twice. Once to send parameters, once to get the return value.
**:
Oh, this can be done by "Intent Received" by "Wait Until Trigger", and this way'd much better. (EDITED)
I don't doubt that features you suggested would be useful, but it seems hard to find the way actual implementation. If you have some detailed idea to implement # 3 as a general feature, sharing would be helpful.