Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-8651

JsonPipe: Add index option

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Pipes 3.1.0
    • Pipes 4.3.2
    • pipes
    • None

    Description

      Given the following pipe:

      .json('').with('valuePath','$')
      .name('item')
      .mkdir('${basePath}/jcr:content/config/item${item.index}')

      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.

      Attachments

        Activity

          People

            npeltier Nicolas Peltier
            tuerkben Ilyas Türkben
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: