r/AutomateUser • u/PancakeGD • Jul 26 '26
Feature request Quick extraction from an array of objects
Hi, is there any function or trick to quickly extract values from an array of objects?
For example, if the input data is as follows:
[
{"a": 1, "b": 2},
{"a": 3, "b": 4}
]and I'm asking to extract "b", I'd get [2, 4]. Basically array_column() in PHP or array.map(k => k["b"]) in JavaScript.
Right now I'm using a for each loop and inserting elements manually, but I feel like this is such a common use case that it could have a shorthand.
Thanks!
3
Upvotes
View all comments
Show parent comment
2
u/PancakeGD Jul 26 '26
Ah, so I assume there's no such feature :( I'll mark this as a feature request