I am trying to get one object returned from a list of objects;
list = [{"name":"Joe","id":1},{"name":"Fred","id":2}]
I want to output the object exactly like the format below;
{"name":"Joe","id":1}
It throws errors when I want to access the object in its entirety;
${list?first} -> Error: Expected a string or something automatically...
Testing this on https://try.freemarker.apache.org/ but I can't seem to be able to extract the full first object, whilst accessing a property from that object works fine..?
I understand that this is somewhat of an odd use case to display the object like that. I need it for a business program that uses freemarker and I want to assign the object back into a variable, which accepts this format.