Problem with JSON nodes with round brackets in their name
-
Hello Klaus,
your JSON-Importer works really well for part of my JSON nodes. – However – for node names with round brackets in their name such as “ozone (O3)” I cannot get it to work. See my two examples below. Example 1 works fine. In example 2 I just changed from “level 2” to “level (2)” – however the according adapted template for level (2) does not work. Since I do not have control over the JSON format, I could not use the Importer, since many of the node names I need to display have ( ) in their names. I also tried various quotes around the node names (straight single or double) – but this appears not to work at all. Do you have any tipp for me?
Thank you for your support. Othmar
P.S: For the basenode round brackets are not a problem – in both examples I have “Sensor (2)” as basenode without problem.
JSON-Sample 1 and associated Template (works)
{“Sensor (2)”:{“level 2”:[{“key”:”This is the first value of key in the ‘level 2’-array”},{“key”:”This is the second value of key in the ‘level 2’-array”},{“key”:”This is the third value of key in the ‘level 2’-array”},{“key”:”This is the fourth value of key in the ‘level 2’-array”}]}}
Template:
{subloop-array:level 2:-1}level 2: {level 2.key}<br>{/subloop-array:level 2}JSON-Sample 2 and associated Template (does not work)
{“Sensor (2)”:{“level (2)”:[{“key”:”This is the first value of key in the ‘level (2)’-array”},{“key”:”This is the second value of key in the ‘level (2)’-array”},{“key”:”This is the third value of key in the ‘level (2)’-array”},{“key”:”This is the fourth value of key in the ‘level (2)’-array”}]}}
Template
{subloop-array:level (2):-1}level (2): {level (2).key}<br>{/subloop-array:level (2)}The page I need help with: [log in to see the link]
- The topic ‘Problem with JSON nodes with round brackets in their name’ is closed to new replies.