Java client application is inserting data into meteor's mongoDB. One of the parameters in json object being sent over to meteor is HashMap<String, MyObject>
converted as gson.toJson(HashMap<String, MyObject>)
. When front end receives Document/Collection object, it's able to get this data block by name and it looks like this:
"RANDOM_NAME1":{"service":"RANDOM_NAME1","count":20,"maxCount":300},
"RANDOM_NAME2":{"service":"RANDOM_NAME2,"count":50,"maxCount":340},
"
I don't know what RANDOM_NAME could be, any string is possible, but value in curly brackets is always 3 parameters - service, count, and maxCount.
Here is my attempt to loop through this block of data to display 3 parameters separately:
HTML - nothing displayed
<template name="displayData">
<h2> Data </h2>
{{#each top}}
{{#with interested_block}}
<p>"service: " {{service}} "count:" {{count}} "max: " {{maxCount}}</p>
{{/with}}
{{/each}}
</template>
HTML - test document where i know RANDOM_NAME value, still show nothing
<template name="displayData">
<h2> Data </h2>
{{#each top}}
{{#with interested_block}}
<p>{{RANDOM_NAME}} </p>
{{/with}}
{{/each}}
</template>
HTML - i can display the whole block of data ( gson.toJson(HashMap<String, MyObject>
) as above)
<template name="displayData">
<h2> Data </h2>
{{#each top}}
<p>"java hashmap: " {{interested_block}}</p>
{{/each}}
</template>
Is this conversion gson.toJson(HashMap<String, MyObject>)
unparsable or there is another way of displaying besides what i've tried?