How can I loop through a JSON object dynamically, so that it outputs all key labels and values? Lets assume we have the following structure but we do not know the names of keys: {“A”:“1”,“B”:“2”,…}
component: f7-block
config:
slots:
default:
- component: oh-repeater
config:
for: i
fragment: true
in: =JSON.parse('[{"A":"1","B":"2"}]')
sourceType: array
slots:
default:
- component: Label
config:
text: =loop.i[i_idx][0]
- component: Label
config:
text: =loop.i[i_idx][1]
Desired output:
A
1
B
2
This code does not work, it is just here for describing the question.