在 json 响应中有以下内容:
[
"alt_sizes":[
{"width":500,"height":333,"url":"http://..."},
{"width":400,"height":266,"url":"http://..."},
{"width":250,"height":167,"url":"http://..."},
{"width":100,"height":67,"url":"http://..."},
{"width":75,"height":75,"url":"http://..."}
]
]
我用以下方式解析我的对象
obj.alt_sizes[0]
但是如果我想用 angular.js 获得具有特定宽度或高度的元素呢?选择小的,宽度为 75 ?