Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Nested json schema output issue

(0) ShareShare
ReportReport
Posted on by 4

Hi Community users,

 

I am creating a Flow which gets triggered with a HTTP response.

The payload I receive has nested objects. (Payload sample attached at bottom)

In flow I am only able to get the data of payload elements which are not nested.

 

alinawaz10_0-1652731154829.png

Plus, when I put the data element in the content field of a new parse Json action, it throws an error "Unable to process template language expressions in action 'DataBody' inputs at line '0' and column '0': 'Required property 'content' expects a value but got null. Path ''.'."


Somehow the elements which are nested are not getting fetched in the schema.

 

{
 "headers": {
 "Host": "xxxxxxxxxxxxxxxxxxxxxxxx",
 "Request-Context": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "Request-Id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "traceparent": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "Content-Length": "609915",
 "Content-Type": "application/json; charset=utf-8"
 },
 "body": {
 "subjectType": "Task",
 "changeType": "Completed",
 "subjectFrontEndUrl": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "timeStamp": "2022-05-16T10:15:50.3686009Z",
 "data": {
 "id": 16520,
 "title": "DSG Expenses Form - (MB):2022-05-16-10-51",
 "description": "DSG Expenses Form - Maximum number 5",
 "priority": "Ad Hoc Task",
 "groupId": 684,
 "groupTitle": "General Forms",
 "progress": 100,
 "isAdhoc": false,
 "createdByPerson": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "person": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "manager": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "startedByPersonId": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "modifiedByPerson": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "completedByPerson": {
 "PersonId": 24059,
 "FirstName": "Mark",
 "FamilyName": "Burgess",
 "Email": "mark.burgess@testting.com"
 },
 "formData": {
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 },
 "Fields": [
 {
 "Field": {
 "Id": 1,
 "Title": "Expense Date",
 "FieldTypeId": 4,
 "FieldType": "Date"
 },
 "Value": "2022-05-16T00:00:00Z",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 2,
 "Title": "Description",
 "FieldTypeId": 3,
 "FieldType": "Text"
 },
 "Value": "new expense",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 3,
 "Title": "Company Expense Type",
 "FieldTypeId": 8,
 "FieldType": "Select List - Single"
 },
 "Value": "Entertaining - DSG",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 4,
 "Title": "Full Amount (incl VAT)",
 "FieldTypeId": 2,
 "FieldType": "Number"
 },
 "Value": 1000,
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 5,
 "Title": "Does this include VAT?",
 "FieldTypeId": 7,
 "FieldType": "Radio Button"
 },
 "Value": "Yes",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 6,
 "Title": "VAT amount",
 "FieldTypeId": 2,
 "FieldType": "Number"
 },
 "Value": 200,
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 7,
 "Title": "How was this expense originally paid?",
 "FieldTypeId": 8,
 "FieldType": "Select List - Single"
 },
 "Value": "With my own personal card/my own cash",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 8,
 "Title": "Chargeable to client",
 "FieldTypeId": 1,
 "FieldType": "Yes/No"
 },
 "Value": false,
 "Location": null
 },
 {
 "Field": {
 "Id": 9,
 "Title": "Attach Receipt/Image",
 "FieldTypeId": 11,
 "FieldType": "Attachment"
 },
 "Value": {
 "type": "image/jpeg",
 "src": "",
 "name": "IMG_1693.jpg"
 },
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 10,
 "Title": "Expense Date",
 "FieldTypeId": 4,
 "FieldType": "Date"
 },
 "Value": "2022-05-16T00:00:00Z",
 "Location": {
 "lat": 55.378051,
 "long": -3.435973
 }
 },
 {
 "Field": {
 "Id": 11,
 "Title": "Description",
 "FieldTypeId": 3,
 "FieldType": "Text"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 12,
 "Title": "Company Expense Type",
 "FieldTypeId": 8,
 "FieldType": "Select List - Single"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 13,
 "Title": "Full Amount (incl VAT)",
 "FieldTypeId": 2,
 "FieldType": "Number"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 14,
 "Title": "Does This Include VAT?",
 "FieldTypeId": 7,
 "FieldType": "Radio Button"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 15,
 "Title": "VAT amount",
 "FieldTypeId": 2,
 "FieldType": "Number"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 16,
 "Title": "How was this expense originally paid?",
 "FieldTypeId": 8,
 "FieldType": "Select List - Single"
 },
 "Value": null,
 "Location": null
 },
 {
 "Field": {
 "Id": 17,
 "Title": "Chargeable to client",
 "FieldTypeId": 1,
 "FieldType": "Yes/No"
 },
 "Value": false,
 "Location": null
 },
 {
 "Field": {
 "Id": 18,
 "Title": "Attach Receipt/Image",
 "FieldTypeId": 11,
 "FieldType": "Attachment"
 },
 "Value": null,
 "Location": null
 }
 ]
 },
 "completedOn": "2022-05-16T10:15:49.013",
 "dueDate": "2022-05-16T00:00:00",
 "lastModified": "2022-05-16T10:15:50.307",
 "createdOn": "2022-05-16T10:15:14.693",
 "form": {
 "id": 2542,
 "title": "DSG Expenses Form"
 },
 "notificationSettings": {
 "push": false,
 "sms": false,
 "email": false,
 "microsoftTeams": false,
 "inApp": false
 },
 "contentSettings": {
 "allowLikes": false,
 "allowComments": false,
 "allowImagesInComments": false,
 "allowDocuments": false
 },
 "isDeleted": false
 },
 "differences": [
 {
 "path": "progress",
 "oldValue": "",
 "newValue": "100"
 },
 {
 "path": "isAdhoc",
 "oldValue": "True",
 "newValue": "False"
 },
 {
 "path": "startedByPersonId.personId",
 "oldValue": "0",
 "newValue": "24059"
 },
 {
 "path": "startedByPersonId.firstName",
 "oldValue": "",
 "newValue": "Mark"
 },
 {
 "path": "startedByPersonId.familyName",
 "oldValue": "",
 "newValue": "Burgess"
 },
 {
 "path": "startedByPersonId.email",
 "oldValue": "",
 "newValue": "mark.burgess@testting.com"
 },
 {
 "path": "completedByPerson.personId",
 "oldValue": "0",
 "newValue": "24059"
 },
 {
 "path": "completedByPerson.firstName",
 "oldValue": "",
 "newValue": "Mark"
 },
 {
 "path": "completedByPerson.familyName",
 "oldValue": "",
 "newValue": "Burgess"
 },
 {
 "path": "completedByPerson.email",
 "oldValue": "",
 "newValue": "mark.burgess@testting.com"
 },
 {
 "path": "completedOn",
 "oldValue": "",
 "newValue": "5/16/2022 10:15:49 AM"
 },
 {
 "path": "lastModified",
 "oldValue": "5/16/2022 10:15:42 AM",
 "newValue": "5/16/2022 10:15:50 AM"
 }
 ]
 }
}
  • jinivthakkar Profile Picture
    jinivthakkar 4,177 on at
    Re: Nested json schema output issue

    @alinawaz10 I took all your json in compose and was able to fetch data as required, I fetched the ID 16250 using below expression

     

    outputs('Compose')?['body']?['data']['Id']
     
    jinivthakkar_0-1652816321191.png

     

     
    On similar lines you can fetch any data from your json
     

    --------------------------------------------------------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard