cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohanWP
Level: Powered On

Create array from single object

Hello experts! 

 

So i have a JSON object in my app that is the result from converting a FormProcessor output (AI-builder) to JSON object:

 

{
"Fields": {
"Delivered": "5.00\n10.00\n3.00\n15.00\n22.00",
"Item number": "JP001\nJP002\nJP003\nJP004\nJP005",
"Requisition": "00003201"
}
}

 

What i would like to do now is to create a new json object for each "item number" and "delivered" that is in the output above. The amount of objects could differ depending the output from the FormProcessor. My expected outcome would be:

 

{
"Fields": {
"Delivered": "5.00",
"Item number": "JP001",
"Requisition": "00003201"
}
},

{
"Fields": {
"Delivered": "10.00",
"Item number": "JP002",
"Requisition": "00003201"
}
},

etc.... For all the items from the FormProcessor output.

 

So i guess this means that i want to create an array containing with the amount of unique items, each in a separate object?

If i have left out some important information please give me a notice. An ELI5 description would be preferable since im definitely not a developer... 🙂

 

Thanks!

 

/JWP

 

2 REPLIES 2
v-siky-msft
Level 10

Re: Create array from single object

Hi @JohanWP ,

 

Do you want to split the JSON object into multiple objects?

I'm afraid that there is no way to group or ungroup JSON string, if you want this feature, please submit an idea to PowerApps Ideas Forum, where is  for customers to provide feedback about Microsoft PowerApps products. What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

Best regards,

Sik

PowerApps Staff JoeF-MSFT
PowerApps Staff

Re: Create array from single object

Hi @JohanWP,

 

Thanks for raising this question. Just to make sure I understood correctly the problem, when you use the Form Processor control in PowerApps, the result that you get for 1 document for the field delivered is 5.00\n10.00\n3.00\n15.00\n22.00?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 390 members 5,758 guests
Please welcome our newest community members: