I need to update a UI to polymer 3 and the received data is converted from XML to json before it reached the client.
on the client side, I am using Polymer3 template to pass the values to underlying polymer elements.
as the XML is storing the values in the attributes, My json comes back as follows.
{
@type: "filter",
@target: "somevalue1",
@operator: "=",
@value: "4458"
},
{
@op: "Or",
@type: "filter",
@target: "somevalue2",
@operator: "=",
@value: "4828"
},
{
@op: "Or",
@type: "filter",
@target: "somevalue3",
@operator: "=",
@value: "2428"
}
now, when I pass this property into my polymer 3 template as with indexing, it considers the whole thing as text and displays on the screen.
{{item['@op']}}
is displayed on the screen as is. Also, I cannot use it as follows
{{item.@op}}
I do not know if @ is considered as code but the whole text incuding the parenthesis {{}} is displayed on the screen.
How to handle these properties.
I cannot convert it into another readable object because the UI is already taking time to render due to the <\vaadin-select> and the json is going to repeat itself inside it nested.