JSONParse assign to variable variable-name

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 316
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

JSONParse assign to variable variable-name

Post by Grovkillen » Thu Jan 03, 2019 8:01 am

Code: Select all

Let>TEMP=RELEASE_NIGHTLY_P%k%
JSONParse>RELEASE_JSON,$[*]['prerelease'],%TEMP%
This will result in a array named %TEMP%.

I was hoping I could assign the array name as suggested in the code above.
Let>ME=%Script%

Running: MS14.5.4

User avatar
Marcus Tettmar
Site Admin
Posts: 7059
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: JSONParse assign to variable variable-name

Post by Marcus Tettmar » Thu Jan 03, 2019 2:21 pm

I can't quite follow what you want to do here. None of the Macro Scheduler functions work like that. If you want the results in a different array/variable name then just assign it afterwards.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7059
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: JSONParse assign to variable variable-name

Post by Marcus Tettmar » Thu Jan 03, 2019 2:27 pm

How about rename the array afterwards:

Code: Select all

JSONParse>RELEASE_JSON,$[*]['prerelease'],ResultArray
ArrayRename>ResultArray,,RELEASE_NIGHTLY_P%k%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 316
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: JSONParse assign to variable variable-name

Post by Grovkillen » Thu Jan 03, 2019 3:07 pm

Marcus Tettmar wrote:
Thu Jan 03, 2019 2:27 pm
How about rename the array afterwards:

Code: Select all

JSONParse>RELEASE_JSON,$[*]['prerelease'],ResultArray
ArrayRename>ResultArray,,RELEASE_NIGHTLY_P%k%
Thanks for that one! :)
Let>ME=%Script%

Running: MS14.5.4

Post Reply