What are you trying to achieve?
Hello,
I am trying to convert a json bundles into a set variable array of string similar to attached.
Steps taken so far
when I add set variable after json, i get 6 operations. see attached. So, I added an array aggregator, but end up with an array of collections and not what i wanted, an array of names.
Thanks for your help
Screenshots: scenario setup, module configuration, errors
Hello @Georges_Fahd,
If this 6 collection within that JSON is fixed then use the get()
function to get things using index and keys.
After ParseJSON use Array Aggregator to properly combine the array to prepare for the use get
function
To implement Set Multiple Variables and then set things one by one.
First : {{get(7.array; "1.Name")}}
Second : {{get(7.array; "2.Name")}}
So on…
I hope this helps you.
Thanks @dilipborad, what you suggested works, but doesn’t resolve my problem. The json is not fixed, basically what I need to do is simple, but i spent 2 days so far trying different ways, but nothing work. I have a list of categories (Name and ID), currently is a data store. Could be stored in a json, or variable. My automation uses chatgpt to generate a post (For WordPress) and it does generates categories and tags for the post. I need to retrive the ID for the categories and the tags that chatgpt generate so I can update WP (Accepts only array of IDs). ChatGPT could generate 1 or multiple categories or tags. maybe my logic is wrong. Any help is appreciated, don’t nee step by step, but a flow process to get the ids into an numeric array. Thanks very much