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 / 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,129 Super User 2025 Season 2 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard