Required Parameters
- jsonpath: The 1-based index jsonpath of the specified segment to loop over (for example,
<arc:set attr="myinputitem.jsonpath" value="/json/foo/" />).
Optional Parameters
- uri: A JSON file URI (for example,
http://mydomain.com/resources/somedata.json,/tmp/myfile.jsonor[FilePath]). - text: A readable handle reference to the JSON data. This handle is created by the jsonOpen operation and is helpful when the input JSON is not a file or raw text, or when it is necessary to perform multiple actions that access the file data of the document.
- handle: A readable handle reference to the JSON data. This handle is created by the jsonOpen operation and is only necessary when the target JSON is not an input file. See jsonOpen for details and examples.
Output Attributes
- jsonpath: The 1-based index jsonpath(s) of the output item relative to the jsonpath set on the input item.
- name: Returns the name of the specified element being looped over (for example,
[myoutitem.name]resolves to the name of thefooJSON element, which isfoo). - type: Returns the data type of the specified element being looped over (for example,
[myoutitem.type]resolves toSTRINGif thefooelement has a string value).
Example
Consider this JSON passed in as an input file:colors array, as shown below:
