Make’s map function is good for single array. If I wanted to do a js map, (more of a forEach) where I have an array of objects and map it into and array of single key/value pairs, how would I go about it?
1 Like
Hey Mitch.
There’s no way to do that with functions alone, to the best of my knowledge, unless you use custom functions.
So the way I’d go about it is using an iterator+aggregator combo. You can use Aggregate to JSON followed by Parse JSON, but I usually go for the Text Aggregator (again followed by Parse JSON). Here’s an example:
blueprint (12).json (6.2 KB)
You can also create your own custom app which might allow you to achieve that within a single module. I’m not sure though, honestly I still need to learn much more about custom apps as I haven’t played much with them.
I hope this points you in the right direction!
2 Likes
Yeah custom apps probably are the route here, thanks.
1 Like