How to get the output of the first item in your query in Velocity -
how output of first item in query in velocity. example, if query $items , contains many objects, how first one?
i tried $items(1) not answer. suggestions? thank you.
in programming languages, the first element in vector 0, not 1.
in programming languages, round brackets mean function invocation, square brackets mean accessing indexed position vector. so, try $items[0].
also, velocity wrapper real java objects. so, if $items object indeed array-like, should use standard accessor method java lists: $items.get(0).
Comments
Post a Comment