anonymous-arrays

Mustache Java: Iterating over an anonymous/keyless/top-level array

淺唱寂寞╮ 提交于 2019-12-13 07:58:28
问题 Question: How to iterate over an array read from json input, that does not have a variable name/key. I did not want to restructure the json file as I'd have to edit the service which generates this json and also other services rely on this file and would have also been affected. A solution for javascript has already been posted using "." as array name in the Mustache template: Can mustache iterate a top-level array? and here Iterate over keyless array with mustache? I had the same question