Closed
Description
Currently forEach()
support native arrays, JSON arrays, and collections, but not JSON objects. Adding JSON objects would would allow parsing payloads like:
- Wikimedia Commons -> https://commons.wikimedia.org/w/api.php?action=query&titles=File:Google%202015%20logo.svg&prop=imageinfo&iiprop=url&format=json
- MySociety MapIt -> https://mapit.mysociety.org/point/4326/0.1293497,51.5464828
Proposed solution
Extend forEach()
to allow JSON objects as well as arrays for the first argument.
Alternatives considered
This is the simplest version of #3147.