AngularJS: How to get the key of a JSON Object

后端 未结 4 1482
孤独总比滥情好
孤独总比滥情好 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条回答
  •  南旧
    南旧 (楼主)
    2021-01-31 15:11

    if dataSets is an array and not an object you first need to ng-repeat the array items and then the key or value.

    {{key}} {{value}}

    just my 2 cents.

提交回复
热议问题