title: Sort by nested field value in FTL liferay
body: <p>My Structure created in liferay is as shown below: </p>
  
  <pre><code>{
      "availableLanguageIds": [
          "en_US"
      ],
      "defaultLanguageId": "en_US",
      "fields": [
          {
              "label": {
                  "en_US": "Image"
              },
              "predefinedValue": {
                  "en_US": ""
              },
              "style": {
                  "en_US": ""
              },
              "tip": {
                  "en_US": "Upload the image to be displayed in the Small Banner"
              },
              "dataType": "image",
              "fieldNamespace": "ddm",
              "indexType": "keyword",
              "localizable": true,
              "name": "smallImage",
              "readOnly": false,
              "repeatable": true,
              "required": true,
              "showLabel": true,
              "type": "ddm-image",
              "nestedFields": [
                  {
                      "label": {
                          "en_US": "Priority of Image"
                      },
                      "predefinedValue": {
                          "en_US": "0"
                      },
                      "style": {
                          "en_US": ""
                      },
                      "tip": {
                          "en_US": "Priority of the uploaded Image. Lower the number, higher the priority."
                      },
                      "dataType": "integer",
                      "fieldNamespace": "ddm",
                      "indexType": "keyword",
                      "localizable": true,
                      "name": "imagePriority",
                      "readOnly": false,
                      "repeatable": false,
                      "required": true,
                      "showLabel": true,
                      "type": "ddm-integer"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>Now in the template I want to sort it using the priority field of the image. My template is as shown below: </p>
  
  <pre><code>&lt;div id="example2" class="slider-pro"&gt;
      &lt;div class="sp-slides"&gt;
          &lt;#if smallImage.getSiblings()?has_content&gt;
              &lt;#list smallImage.getSiblings()?sort_by(["properties","imagePriority"]) as cur_smallImage&gt;
                  &lt;#if cur_smallImage.getData()?? &amp;&amp; cur_smallImage.getData() != ""&gt;
                      &lt;div class="sp-slide"&gt;
                          &lt;img class="sp-image" alt="${cur_smallImage.getAttribute("alt")}" src="${cur_smallImage.getData()}" data-src="${cur_smallImage.getData()}" data-retina="${cur_smallImage.getData()}" /&gt;
                      &lt;/div&gt;
                  &lt;/#if&gt;
              &lt;/#list&gt;
          &lt;/#if&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried the sorting as <b>?sort_by("cur_smallImage.imagePriority")</b> also by <b>?sort_by("imagePriority")</b> but it didnt work. I want to display the images in the sequence of the priority specified. <br/>
  Please help.</p>