Hi Community!
I currently have an array the following format:
[
{
"sss_index": 1,
"sss_name": "Project Overview",
"sss_parentname": null,
"sss_quotetemplateheadingid": "1b3cdc49-3e36-ee11-bdf5-00224891c295",
"sss_tier": 1
},
{
"sss_index": 1,
"sss_name": "Project Summary",
"sss_parentname": "Project Overview",
"sss_quotetemplateheadingid": "6c0d2c51-3e36-ee11-bdf5-00224891c295",
"sss_tier": 2
},
{
"sss_index": 2,
"sss_name": "Scope",
"sss_parentname": null,
"sss_quotetemplateheadingid": "b8d85c63-3e36-ee11-bdf5-00224891c295",
"sss_tier": 1
}
I'm looking to convert this into a single record, that looks like so:
{
[sss_index]-[sss_name]:true
}
or
{
"1-Project Overview": true,
"1-Project Summary": true,
"2-Scope": true
}
Using Select, I am able to create an array of records like this:
[
{
"1-Project Overview": true
},
{
"1-Project Summary": true
},
{
"2-Scope": true
}
]
But...I can't figure out how to create a single record out of the array.
Any ideas?
Thanks!
Brendan
Something simple like this?
Comnpose code:
{
"inputs": {
"@{outputs('Data')[0]['sss_index']}-@{outputs('Data')[0]['sss_name']}": true,
"@{outputs('Data')[1]['sss_index']}-@{outputs('Data')[1]['sss_name']}": true,
"@{outputs('Data')[2]['sss_index']}-@{outputs('Data')[2]['sss_name']}": true
}
}
Outpu:
{
"1-Project Overview": true,
"1-Project Summary": true,
"2-Scope": true
}
@SanmeshG , the values I want in the record are a concatenation of strings from the previous records. As I've demonstrated above.
Hi @Brendan1 ,
If you original array has say 3 objects , then which value do you want to get/add for the new columns?
Hi @SanmeshG ,
I'd like to format the single record like so:
{
[sss_index]-[sss_name]:true
}
As an example of the end result i'd like:
{
"1-Project Overview": true,
"1-Project Summary": true,
"2-Scope": true
}
Any ideas?
Hi @Brendan1 ,
Your current array has 3 objects and each object has the same columns with different values.
If you want to convert it to a single record which values you want to add for the columns(or properties in your new object)?
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492