\usemodule[json]
\loadjsonfile[mglist][addr.json]
\showmakeup[space]

\starttext
  % read all adresses
  \dorecurse{\jsonlength{mglist}{records}}{%
    % create macros for later use ...
    \edef\Salutaion{\jsonfield{mglist}{records[\recurselevel].salutation}}
    \edef\Title{\jsonfield{mglist}{records[\recurselevel].title}}
    \edef\Name{\jsonfield{mglist}{records[\recurselevel].name}}
    \edef\Firstname{\jsonfield{mglist}{records[\recurselevel].firstname}}
    \edef\Street{\jsonfield{mglist}{records[\recurselevel].street}}
    \edef\ZIP{\jsonfield{mglist}{records[\recurselevel].zip}}
    \edef\Location{\jsonfield{mglist}{records[\recurselevel].location}}
    % print the Adress ... 
    \Salutaion\space\ifx\Title\empty\else\Title\space\fi\Firstname\space\Name \blank[small]
    \Street \blank[small]
    \ZIP\space\Location 
    \blank[line]
  }
  % works ...
  \edef\temp{\ctxlua{context("")}}
  \ifx\temp\empty empty\else not empty\fi
  % works ...
  \edef\compareVal{A}
  \edef\temp{\ctxlua{context("A")}}
  \ifx\temp\compareVal equal\else not equal\fi
\stoptext