I'm working on displaying a button only if a JSON object contains the element hidden: true
.
The child elements are unpredictable.
draw": { "item": { "aircraft": { "hidden": false} }
draw": { "item": { "mounted": { "hidden": false} }
I am using ng-repeat on this JSON, but since I don't know whether it's aircraft
or mounted
, I can't do something like this:
<button ng-if="json.draw.item.next.hidden" />
How can I request the next element without knowing its name?