How to get values from JSON in Freemarker
In the comment you say that you get the whole JSON as a single string. So then, assuming you have recent FreeMarker version, you can use ?eval_json
:
<#assign someParsed = someString?eval_json>
And now you use expressions like someParsed.tuStatus[0].history[0].evtDscr == "Package has been deliverd."
. (Though I guess the evtDscr
value is not very reliable... like if somebody fixes the typo in it (should be "delivered"), the comparison won't work.)