You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Ilyas Türkben (Jira)" <ji...@apache.org> on 2019/08/22 09:02:00 UTC
[jira] [Created] (SLING-8651) JsonPipe: Add index option to
valuePath
Ilyas Türkben created SLING-8651:
------------------------------------
Summary: JsonPipe: Add index option to valuePath
Key: SLING-8651
URL: https://issues.apache.org/jira/browse/SLING-8651
Project: Sling
Issue Type: New Feature
Components: pipes
Affects Versions: Pipes 3.1.0
Reporter: Ilyas Türkben
Given the following pipe:
{code:java}
.json('').with('valuePath','$')
.name('item')
.mkdir('${basePath}/jcr:content/config/item${item.index}'){code}
where json pipe receives a JSON file containing an array of objects and I would like to use
the index of objects in the array when I create nodes using mkdir.
Currently, my JSON file has those indexes hard coded.
Considering {{item.index}} might be a custom property in my json file, I propose to use {{$index}} for that purpose.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)