Hi,
i have a lot of php scripts, which generates JSON data out of a database. My idea was to create custom widgets to present these values with a nice style.
How can i load these JSON string and access the values in it?
thanks in advance
Norbert
Hi,
i have a lot of php scripts, which generates JSON data out of a database. My idea was to create custom widgets to present these values with a nice style.
How can i load these JSON string and access the values in it?
thanks in advance
Norbert
It’s not Habpanel related. With http binding you can have Items with JSON parsing (it’s better to use cache option from http binding)
You can use $eval
(not JSON.parse or angular.fromJson) to convert your JSON to an object in your template.
In the example above json
could be itemState('Your_Item')
where Your_Item
is a String item where you put your JSON.
could you give a small example of the JSON data you use? For me it was not working with my configuration.