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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to iterate over li...
Power Automate
Unanswered

How to iterate over list of json objects using VB script in power automate desktop

(0) ShareShare
ReportReport
Posted on by

I have a list of json objects which needs to be iterated to populate the data into excel using VB script.

 

LR = %TestJsonObject.Count%

For i=0 To LR

sht.Range("C"&i+25).Value = "%TestJsonObject[0]['Key1']%"

 

But when i pass i in the place of 0 in the above line ,It throws error as the variable i not identified. i have tried escape character / , also tried to split using & but still it gives error. is there any way to pass the vb script run time variable inside power automate variable when used in VB script.

 

PS: i have a scenario as the each json is a row in excel and needs to be populated.

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Atharvazd 

     

    How you have passed the variable within vb script, could you show that ?

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The scripting actions in PAD do not accept any complex data structures as inputs or outputs. It will usually only accept numeric values and strings. If you want to pass a JSON object, you will need to pass it as a simple string first and then have VBScript convert it to an object.

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

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard