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

Sort with JSON schema help

Dear community i am stuck again. 

 

I am reading out data from SQL, its a view that i have created that gives e some values. 

 

Here is my Json input 

 

[
  {
    "ResultSets": {
      "Table1": [
        {
          "Name": " prototype",
          "TidPunkt": "2020-11-29T00:00:00",
          "Conductivity": "0.4322977066040039",
          "Volume": "38900",
          "Alarm": ""
        },

 

I want to sort this in a create html table like this

Name TidPunkt Conductivity Volume

06572020-11-25T23:48:03Z10.526404857635498
06792020-11-25T11:11:54Z20.47801780700683594
06702020-11-20T23:22:16Z11.4046096801757812

 

But i get this 

 

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

 

My schema looks like this 

 

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "ResultSets": {
        "type": "object",
        "properties": {
          "Table1": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "TidPunkt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Conductivity": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Volume": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "Alarm": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "Name",
                "TidPunkt",
                "Conductivity",
                "Volume",
                "Alarm"
              ]
            }
          }
        }
      }
    }
  }
}

 

 

What do i do wrong? 

 

All the best

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Emil2,

 

After you get the output, you could put it into a Compose action:

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

  

Then use expression to get table 1, then put it into the Create HTML table action:
Screenshot 2020-12-01 132936.jpg

 

Run result:

Screenshot 2020-12-01 132851.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Emil2,

 

After you get the output, you could put it into a Compose action:

{"Table1":[{"Name":"0657","TidPunkt":"2020-11-29T00:00:00","Conductivity":"1","Volume":"38900","Alarm":""}

  

Then use expression to get table 1, then put it into the Create HTML table action:
Screenshot 2020-12-01 132936.jpg

 

Run result:

Screenshot 2020-12-01 132851.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,757)