Skip to content
Discussion options

You must be logged in to vote

The solution is to use the command \JSONParseArrayMapInline but you need to double the # which is something you always need to do if you want to nest functions to access the relevant argument (the following example assuming the current version of jsonparse):

\documentclass{article}
\usepackage{jsonparse,tabularx}

\NewDocumentCommand{\drawinfotable}{m}{
    \begin{tabularx}{100mm}{|m{90mm}|X|}
        \textbf{key a} &
        \textbf{key b} \\ \hline
        \JSONParseArrayMapInline{#1}{array}{%
            \JSONParseValue{#1}{array[##1].key_a} & 
            \JSONParseValue{#1}{array[##1].key_b} \\
        }
        \hline
    \end{tabularx}
}

\JSONParse{\myJSON}{
    {
        "array" …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jasperhabicht
Comment options

Answer selected by Zumiha
@Zumiha
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants