Created
June 14, 2023 13:58
-
-
Save camrobert/d73c07d5f5f0af6bd4d2f845b4297fb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
SET @json = '{"menu": { | |
"id": "file", | |
"value": "File", | |
"popup": { | |
"menuitem": [ | |
{"value": "New", "onclick": "CreateDoc(a)"}, | |
{"value": "Open", "onclick": "OpenDoc(b)"}, | |
{"value": "Save", "onclick": "SaveDoc(c)"} | |
] | |
} | |
}}' | |
SET @rows = BuildRowsetFromJson(@json, '$.menu.popup.menuitem[*]', 1) | |
]%% | |
<table border=1> | |
<tr><th>name</th><th>email</th></tr> | |
%%[FOR @i = 1 TO Rowcount(@rows) DO]%% | |
<tr> | |
%%[FOR @c = 1 TO 2 DO]%% | |
<td>%%=Field(Row(@rows,@i),@c)=%%</td> | |
%%[NEXT @c]%% | |
</tr> | |
%%[NEXT @i]%% | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment