web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / JSON array to DataVers...
Power Automate
Unanswered

JSON array to DataVerse (CDS) column/field

(0) ShareShare
ReportReport
Posted on by 37

Hi community,

 

I need help with capturing JSON array value to DataVerse (CDS) columns/field, please refer below sample JSON array format,

[  

  {
    "ID""633128875",
    "answer"1,
    "score"8
  },
  {
    "ID""633102840",
    "answer"994290000
  },
  {
    "ID""633114253",
    "answer"1,
    "score"5
  }

]

NOTE* This is just sample JSON array with very less data(only 3 data objects), and score might not be there in each object.

 

What I want to do is, capture score value to DataVerse column based on ID from JSON array object.

For an example, if ID = "633114253", then I want to capture score(5) to a column in DataVerse.

 

Any help is much appreciated!

 

Regards,

Hardik Chauhan

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @chauhanhardik 

     

    Here it is

     

    image.png

     

    Above copy the schema as follows:

     

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "ID": {
                    "type""string"
                },
                "answer": {
                    "type""integer"
                },
                "score": {
                    "type""integer"
                }
            },
            "required": [
                "ID",
                "answer"
            ]
        }
    }
     
     
    image.png
     
    image.png
    Here is the run result
     
    image.png
    image.png
  • chauhanhardik Profile Picture
    37 on at

    Hi @abm 

     

    I think with your suggested solution, I'll have to create a variable for each ID, and then pass that variable to column in DataVerse. And by doing so, I'll have to create as many variables for each IDs. 

     

    And based on ID only, I want to map score value to columns in DataVerse.

     

    Thanks,

    Hardik

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @chauhanhardik 

     

    I might have misunderstood your question. Do you want to map all the values in Dataverse then after the parse Json step you can add the dataverse step and map the values from the previous step.

     

    Thanks

  • chauhanhardik Profile Picture
    37 on at

    Yup that's correct @abm 

     

    so for that I'll have to write an expression for each column to set score based on ID from JSON array.

    something like below table, but I'm struggling with expression to get score based on ID for each column/field.

     

    DataVerse Columnexpression
    Column1get score where ID = "1"
    Column2get score where ID = "2"
    Column3get score where ID = "3"
    Column4get score where ID = "4"

     

    Regards,

    Hardik

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @chauhanhardik 

     

    I am not sure about your requirement correctly.  Couple of questions.

     

    1. Are you looking to insert all the data from JSON into Dataverse?

    2. If you going to filter by ID where you getting the ID from for the filter?

  • chauhanhardik Profile Picture
    37 on at

    Hi @abm 

     

    if possible, shall we connect so, I can explain you.

     

    Regards,

    Hardik

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @chauhanhardik 

     

    Check your email please?

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @chauhanhardik 

     

    In order to map all the values in one go you need to create a flat structure of JSON format.

     

    {
        "ID633128875""633128875",
        "answer633128875"1,
        "score633128875"8
      },
      {
        "ID633102840""633102840",
        "answer633102840"994290000
      }
  • chauhanhardik Profile Picture
    37 on at

    Hi @abm 

     

    I really appreciate your help here. And it's working as expected.

     

    Thanks and regards,

    Hardik Chauhan

  • ATKV Profile Picture
    2 on at

    @abm , can you please help me with the similar issue? I think you took this offline and helped the original poster. Any help appreciated.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard