[foreach():]

Doc requests, organization, and submissions

Moderators: Azhrei, dorpond, trevor

Post Reply
User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

[foreach():]

Post by Bone White »

I updated the page on the documentation wiki to include that it can function on JSONS ( not only string lists ). I also added examples of both JSON types, how they function and an example of using the list separator parameter. This is my first "real" contribution to the documentation, so please check over my usage/style. I did test every example I posted in 1.3.b87

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [foreach():]

Post by Azhrei »

Cool. Thanks for the additions.

I thought the loops already made mention that when a JSON Object was used, the keys of the object were the values iterated over? In any case, it's always good to have more/better examples.

Wiki link added: [foreach:].

User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

Re: [foreach():]

Post by Bone White »

Well I'd been converting all my json arrays and objects into string lists to run through a for each loop then get each value by the index, or just using a for loop with indices. I wondered if it did work with arrays and objects, and it does, so I figured I'd add it so other newcomers to macro coding would know also. I take the documentation wiki as being pretty thorough, was surprised this was missing.

Oh well, glad to return some contribution for all the help I've received.

Post Reply

Return to “Documentation Requests/Discussion”