cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Trouble getting values from pairs when iterating through an array of objects

I have an object that instantiated in Flow called emailReplyObect that resembles the following:

 

{
  "values": [
    {
      "key1": "value1"
    },
    {
      "key2": "value2"
    },
    {
      "key3": "value3"
    },
    {
      "key4": "value4"
    },
    {
      "key5": "value5"
    },
    {
      "key6": "value6"
    },
    {
      "key7": "value7"
    },
    {
      "key8": "value8"
    },
    {
      "key9": "value9"
    },
    {
      "key10": "value10"
    }
  ]
}

I need the value of the "keyn" and the value of "valuen".

 

I also need to iterate through them to get the value of each. The "keyn" is used for additional logic else where in the Flow which is why I need the value of "keyn". 

To iterate through it, I'm assigned the arry of objects "values" to an array:

Capture.PNG

Then I iterate through that array:

Capture1.PNG

This iterates through each object in the array:

Capture2.PNG

Here is the layout of the entire Flow:

Capture3.PNG

I tried using parseJson, but it just outputs:

Capture4.PNG

Schema is either defined manually or automatically. Same result.

The problem is I'm not sure how to get the values of "keyn" and the values of "valuen". Suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Trouble getting values from pairs when iterating through an array of objects

There really is no value for Keyn.  Key# is the index that will get you the value of the item in the array.

values[key#]


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Highlighted
Dual Super User III
Dual Super User III

Re: Trouble getting values from pairs when iterating through an array of objects

There really is no value for Keyn.  Key# is the index that will get you the value of the item in the array.

values[key#]


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (8,826)