cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

 

5 REPLIES 5
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

Power Apps Staff JoeF-MSFT
Power Apps 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?

JohanWP
Level: Powered On

Re: Create array from single object

@JoeF-MSFT Sorry for the late reply, but yes that is the output from the formprocessing component in the powerapp

Power Apps Staff JoeF-MSFT
Power Apps Staff

Re: Create array from single object

Hi @JohanWP, would it be possible for you to share a snippet of how the delivered field looks in the document?

Ashish2012
Level 8

Re: Create array from single object

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

Please submit this idea, If already submitted. Share the link with me to like the idea.

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,151)