Say I have pulled a list of rows from an Excel connector, such that I'm passing around an array that looks like this:
[
{
"id": 3,
"name": "John",
"colour": "Red"
}
,
{
"id": 5,
"name": "Mark",
"colour": "Black"
}
]
And now I want to send an email which includes in the body:
- John likes the colour Red
- Mark likes the colour Black
How do I go about achieving that using the various built-in manipulation tools?
In C# I'd just be saying:
data.Select(r => $"* {r.name} likes the colour {r.colour}"), Environment.NewLine)
But
split()
and join()
functions for expressions, but nothing like a select()
AFAICT, and I can't see how to use the Select Action Block to solve this.Environment.NewLine
at all?Ideally I'd prefer a solution that doesn't involve using json()
, nor explicitly looping through the array and manipulating individual variables those both seem super heavy-weight for such a trivial task, but if either of those are the only way to do it, then that would still be good to know.
concat(item()?['name'],' likes the colour ',item()?['colour'],'.')
((99. if it resolves your issue, please mark it as an answer. :) )