cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jfhandfield
Frequent Visitor

Parsing a JSON file to CosmosDB

Hi there,

 

I'm pretty new to PowerAutomate and I was wondering if you guys could help me out. Here's what I'm trying to accomplish. I currently have a JSON file located on a OneDrive and would like to first be able to fetch the file on my OneDrive to ultimately be able to upload it to my CosmosDB. The ultimate result of that would be that anyone could dump a specific JSON File and it would get uploaded in my CosmosDB using the Create or update document (V2). This way I don't have to be there to upload a new version of my Database.


Thank you for the help

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jfhandfield ,

 

ericcheng_0-1626102775480.png

 

Compose - tweak Get_file_content based on the name of your OneDrive action and paste into expressions

 

base64ToString(outputs('Get_file_content')?['body']['$content'])

 

Parse JSON, set input as the output from Compose action and paste below into Schema

 

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "id": {
                "type""string"
            },
            "tri": {
                "type""string"
            },
            "code": {
                "type""string"
            },
            "image": {
                "type""string"
            },
            "nom": {
                "type""string"
            },
            "description": {
                "type""string"
            },
            "tomeV": {
                "type""string"
            },
            "couleur": {
                "type""string"
            },
            "source": {
                "type""string"
            },
            "categorie": {
                "type""string"
            },
            "categoriePath": {
                "type""string"
            },
            "panonceaux": {
                "type""boolean"
            },
            "pellicules": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "usages": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "dimensions": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "favoris": {}
        },
        "required": [
            "id",
            "tri",
            "code",
            "image",
            "nom",
            "description",
            "tomeV",
            "couleur",
            "source",
            "categorie",
            "categoriePath",
            "panonceaux",
            "pellicules",
            "usages",
            "dimensions",
            "favoris"
        ]
    }
}
 
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

View solution in original post

10 REPLIES 10
jfhandfield
Frequent Visitor

I don't know if what I'm asking is impossible to accomplish or my explaination is not detailed enough but here goes : 

 

Here's a screenshot of what I have accomplish right now : 

 

image.png

 

I know there is way to many steps but I was trying stuff out. So I can fetch my JSON on my onedrive and the result in my Initialize variable is not a JSON format but close :

image.png

 

So from there how can I parse my json to be able to reupload to Cosmos DB ? 

 

Thank you

jfhandfield
Frequent Visitor

Is this something that's not possible to do ?

Hi @jfhandfield 

Do you still have this issue?  Can you share a sample of your file and the file extension it is stored in?

Yeah I still have the same problem. Parsing is impossible.

 

Here's a sample of my original JSON in my OneDrive. The extension is JSON

 

[
  {
    "id": "Auto-05-MTQ-12392",
    "tri": "Auto-05-MTQ-12392",
    "code": "Auto-05",
    "image": "12392",
    "nom": "Écusson autoroute 5",
    "description": "Identification de l'autoroute 5. Pour plus d'information, voir le panneau d'indication I-130-1.",
    "tomeV": "5.5.2",
    "couleur": "Bleu",
    "source": "MTQ",
    "categorie": "Écussons d'autoroute",
    "categoriePath": "Repérage-Écussons d'autoroute",
    "panonceaux": false,
    "pellicules": [
      "IV"
    ],
    "usages": [
      "Route"
    ],
    "dimensions": [
      "450x600",
      "900x600"
    ],
    "favoris": null
  },
  {
    "id": "Auto-10-MTQ-12393",
    "tri": "Auto-10-MTQ-12393",
    "code": "Auto-10",
    "image": "12393",
    "nom": "Écusson autoroute 10",
    "description": "Identification de l'autoroute 10. Pour plus d'information, voir le panneau d'indication I-130-1.",
    "tomeV": "5.5.2",
    "couleur": "Bleu",
    "source": "MTQ",
    "categorie": "Écussons d'autoroute",
    "categoriePath": "Repérage-Écussons d'autoroute",
    "panonceaux": false,
    "pellicules": [
      "IV"
    ],
    "usages": [
      "Route"
    ],
    "dimensions": [
      "450x600",
      "680x900"
    ],
    "favoris": null
  }
]

 

Here's a sample of the decoded version of the JSON in my power automate 

"[\r\n\t{\r\n\t\t\"id\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"tri\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"code\" : \"Auto-05\",\r\n\t\t\"image\" : \"12392\",\r\n\t\t\"nom\" : \"Écusson autoroute 5\",\r\n\t\t\"description\" : \"Identification de l'autoroute 5. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"900x600\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"tri\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"code\" : \"Auto-10\",\r\n\t\t\"image\" : \"12393\",\r\n\t\t\"nom\" : \"Écusson autoroute 10\",\r\n\t\t\"description\" : \"Identification de l'autoroute 10. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"tri\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"code\" : \"Auto-13\",\r\n\t\t\"image\" : \"12394\",\r\n\t\t\"nom\" : \"Écusson autoroute 13\",\r\n\t\t\"description\" : \"Identification de l'autoroute 13. Pour plus d'information, voir le panneau d'indication I-130-1\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-15-MTQ-12395\",\r\n\t\t\"tri\" : \"Auto-15-MTQ-12395\",\r\n\t\t\"code\" : \"Auto-15\",\r\n\t\t\"image\" : \"12395\",\r\n\t\t\"nom\" : \"Écusson autoroute 15\",\r\n\t\t\"description\" : \"Identification de l'autoroute 15. Pour plus d'information, voir le panneau d'indication I-130-1.\\n\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"900x600\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-19-MTQ-12396\",\r\n\t\t\"tri\" : \"Auto-19-MTQ-12396\",\r\n\t\t\"code\" : \"Auto-19\",\r\n\t\t\"image\" 

 

Here's the schema in the Parsing Json step : 

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "id": {
                "type": "string"
            },
            "tri": {
                "type": "string"
            },
            "code": {
                "type": "string"
            },
            "image": {
                "type": "string"
            },
            "nom": {
                "type": "string"
            },
            "description": {
                "type": "string"
            },
            "tomeV": {
                "type": "string"
            },
            "couleur": {
                "type": "string"
            },
            "source": {
                "type": "string"
            },
            "categorie": {
                "type": "string"
            },
            "panonceaux": {
                "type": "boolean"
            },
            "pellicules": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            },
            "usages": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            },
            "dimensions": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            },
            "date_chargement": {
                "type": "string"
            },
            "favoris": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            }
        },
        "required": [
            "id",
            "tri",
            "code",
            "image",
            "nom",
            "description",
            "tomeV",
            "couleur",
            "source",
            "categorie",
            "panonceaux",
            "date_chargement"
        ]
    }
}

 

And this is the end result

 

ValidationFailed. The schema validation failed.

 

Thank you

Hi @jfhandfield ,

 

ericcheng_0-1626102775480.png

 

Compose - tweak Get_file_content based on the name of your OneDrive action and paste into expressions

 

base64ToString(outputs('Get_file_content')?['body']['$content'])

 

Parse JSON, set input as the output from Compose action and paste below into Schema

 

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "id": {
                "type""string"
            },
            "tri": {
                "type""string"
            },
            "code": {
                "type""string"
            },
            "image": {
                "type""string"
            },
            "nom": {
                "type""string"
            },
            "description": {
                "type""string"
            },
            "tomeV": {
                "type""string"
            },
            "couleur": {
                "type""string"
            },
            "source": {
                "type""string"
            },
            "categorie": {
                "type""string"
            },
            "categoriePath": {
                "type""string"
            },
            "panonceaux": {
                "type""boolean"
            },
            "pellicules": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "usages": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "dimensions": {
                "type""array",
                "items": {
                    "type""string"
                }
            },
            "favoris": {}
        },
        "required": [
            "id",
            "tri",
            "code",
            "image",
            "nom",
            "description",
            "tomeV",
            "couleur",
            "source",
            "categorie",
            "categoriePath",
            "panonceaux",
            "pellicules",
            "usages",
            "dimensions",
            "favoris"
        ]
    }
}
 
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

View solution in original post

jfhandfield
Frequent Visitor

Hey @eric-cheng Thank you for the quick reply.

 

I tried the changes you told me to do but unfortunately with the same outcome. I'll post some of the outputs I get so you can maybe understand better.

 

This is a screen of my steps :

image.png

The output of the Get Content :

{"statusCode":200,"headers":{"Pragma":"no-cache","x-ms-request-id":"cf311a2f-a686-4095-8c55-bcbc81bc211e","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Accept-Ranges":"bytes","Cache-Control":"no-cache","Date":"Mon, 12 Jul 2021 15:25:15 GMT","ETag":"\"{32935D6D-F7E8-4021-9776-EF49C7723E1F},1\"","Location":"https://canada-001.azure-apim.net/apim/onedriveforbusiness/shared-onedriveforbu-108872fb-9f3e-4889-8d33-dcb4-26fd27ae/datasets/default/files/b%2521FTZpY5XNIUifyFrmoCbFbLOoEd7JkHhOmJ8lUP_8CsQlpEUwrOBpTKHgs9cr4TZO.01V4H6HVLNLWJTF2HXEFAJO5XPJHDXEPQ7/content?inferContentType=true","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Length":"1466994","Content-Disposition":"attachment; filename=\"Panneau.json\"","Content-Type":"application/octet-stream","Expires":"-1"},"body":{"$content-type":"application/octet-stream","$content":"Ww0KCXsNCgkJ

The input and output of the compose step are the same :

"[\r\n\t{\r\n\t\t\"id\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"tri\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"code\" : \"Auto-05\",\r\n\t\t\"image\" : \"12392\",\r\n\t\t\"nom\" : \"Écusson autoroute 5\",\r\n\t\t\"description\" : \"Identification de l'autoroute 5. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"900x600\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"tri\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"code\" : \"Auto-10\",\r\n\t\t\"image\" : \"12393\",\r\n\t\t\"nom\" : \"Écusson autoroute 10\",\r\n\t\t\"description\" : \"Identification de l'autoroute 10. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"tri\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"code\" : \"Auto-13\",\r\n\t\t\"image\" : \"12394\",\r\n\t\t\"nom\" : \"Écusson autoroute 13\",\r\n\t\t\"description\" : \"Identification de l'autoroute 13. Pour plus d'information, voir le panneau d'indication I-130-1\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-15-MTQ-

The input of the parse JSON :

{"content":"[\r\n\t{\r\n\t\t\"id\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"tri\" : \"Auto-05-MTQ-12392\",\r\n\t\t\"code\" : \"Auto-05\",\r\n\t\t\"image\" : \"12392\",\r\n\t\t\"nom\" : \"Écusson autoroute 5\",\r\n\t\t\"description\" : \"Identification de l'autoroute 5. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"900x600\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"tri\" : \"Auto-10-MTQ-12393\",\r\n\t\t\"code\" : \"Auto-10\",\r\n\t\t\"image\" : \"12393\",\r\n\t\t\"nom\" : \"Écusson autoroute 10\",\r\n\t\t\"description\" : \"Identification de l'autoroute 10. Pour plus d'information, voir le panneau d'indication I-130-1.\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"tri\" : \"Auto-13-MTQ-12394\",\r\n\t\t\"code\" : \"Auto-13\",\r\n\t\t\"image\" : \"12394\",\r\n\t\t\"nom\" : \"Écusson autoroute 13\",\r\n\t\t\"description\" : \"Identification de l'autoroute 13. Pour plus d'information, voir le panneau d'indication I-130-1\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-15-MTQ-12395\",\r\n\t\t\"tri\" : \"Auto-15-MTQ-12395\",\r\n\t\t\"code\" : \"Auto-15\",\r\n\t\t\"image\" : \"12395\",\r\n\t\t\"nom\" : \"Écusson autoroute 15\",\r\n\t\t\"description\" : \"Identification de l'autoroute 15. Pour plus d'information, voir le panneau d'indication I-130-1.\\n\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"900x600\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-19-MTQ-12396\",\r\n\t\t\"tri\" : \"Auto-19-MTQ-12396\",\r\n\t\t\"code\" : \"Auto-19\",\r\n\t\t\"image\" : \"12396\",\r\n\t\t\"nom\" : \"Écusson autoroute 19\",\r\n\t\t\"description\" : \"Identification de l'autoroute 19. Pour plus d'information, voir le panneau d'indication I-130-1.\\n\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" : \"Bleu\",\r\n\t\t\"source\" : \"MTQ\",\r\n\t\t\"categorie\" : \"Écussons d'autoroute\",\r\n\t\t\"panonceaux\" : false,\r\n\t\t\"pellicules\" : [ \"IV\" ],\r\n\t\t\"usages\" : [ \"Route\" ],\r\n\t\t\"dimensions\" : [ \"450x600\", \"680x900\" ],\r\n\t\t\"date_chargement\" : \"2021-04-19\"\r\n\t},\r\n\t{\r\n\t\t\"id\" : \"Auto-20-MTQ-12397\",\r\n\t\t\"tri\" : \"Auto-20-MTQ-12397\",\r\n\t\t\"code\" : \"Auto-20\",\r\n\t\t\"image\" : \"12397\",\r\n\t\t\"nom\" : \"Écusson autoroute 20\",\r\n\t\t\"description\" : \"Identification de l'autoroute 20. Pour plus d'information, voir le panneau d'indication I-130-1.\\n\",\r\n\t\t\"tomeV\" : \"5.5.2\",\r\n\t\t\"couleur\" :

And the last one is the output :

{"errors":[{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[0]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[1]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[2]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[3]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[4]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[5]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[6]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[7]","value":["categoriePath","favoris"],"schemaId":"#/items","errorType":"required","childErrors":[]},{"message":"Required properties are missing from object: categoriePath, favoris.","lineNumber":0,"linePosition":0,"path":"[8]","value":

 

Thank you again

I think I figured out the problem. The problem is with the original JSON. Some of the properties are either Null or inexistant. I think that might be the reason why.

Thanks @jfhandfield 

 

If the JSON can have nullable values, you need to define your schema to allow this

 

"field_name": {
"type": [
"string",
"null"
]
}

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

@eric-cheng I didn't know that. I'll give it a try and let you know the outcome of it.

 

Thank you again!

jfhandfield
Frequent Visitor

@eric-cheng Thank god for your help. Everything is working fine now. My last question would be that the output of the JSON starts like that : 

{"body":[{"id":"Auto-05-MTQ-12392",

 Is there a way to remove the {"body": part ? Unless you tell me that it's irrelevant and when importing it in my CosmosDB it won't make a difference.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,290)