perk
10 years agoAdept
Getting JSON fields in Freemarker
Hi,
I have code that retrieves a JSON object with the following structure and stores it in a variable named response_getUser:
{ "user": { "id": 123
}
}
However, I am unable to access the id using the following code
response_getUser.content.user.get("id")
I keep receiving this a null error for the code.
Is there any help on how to debug this? I am new to using freemarker and it has been really difficult to figure out what the variables are in lithium.