AngularJS: How to get the key of a JSON Object

后端 未结 4 1401
孤独总比滥情好
孤独总比滥情好 2021-01-31 14:45

I am unsure if this has got anything to do with AngularJS at all and if it is only JSON related.

Anyhow, let us say that we have the following JSON:

$s         


        
4条回答
  •  旧时难觅i
    2021-01-31 15:05

    For every dataSet in dataSets, print the key and then iterate through the individual items:

    {{key}}
    {{value}}

    {{dataset}} can be displayed in one go also, the array would be displayed as a comma separated list of values.

提交回复
热议问题