<HTML><BODY>Thank you for your help! Now it works. Now in JSON output I have:<br><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">{"parts":["Title1","Title2","Title3"],<br>"Title1":"The title of the content: Title 3 (1/3)",</pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">"Title3":"The title of the content: Title 1 (3/3)",</pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">"Title2":"The title of the content: Title 2 (2/3)"}</pre><br>Still I'd like another output something like<br><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"><br></span></span><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">{"Titles": [ <br>{ "Title":"The title of the content: Title 3 (1/3)"},</pre><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"></span></span><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">{"Title":"The title of the content: Title 1 (3/3)"},</pre><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"></span></span><pre style="overflow-wrap: break-word; white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word; white-space: pre-wrap;">{"Title":"The title of the content: Title 2 (2/3)"}</pre><span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;">]<br>}<br><br>But it seems I can't achive it with <span style="font-family: Arial; font-size: 14px;" data-mce-style="font-family: Arial; font-size: 14px;"><cms:jsonpart>. I guess I need custom java code for output like this.</span><br><br></span><br><br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">
        Среда, 13 февраля 2019, 9:55 +03:00 от 脸谱 <afeinet@163.com>:<br>
        <br>
        <div id="">






<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base target="_self" href="https://e.mail.ru/">
                
            <div id="style_15500409400000000314_BODY"><div class="class_1550047378"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br><div>There is another way you can try it:</div><div>Jsonpart's element uses variables and does not use a fixed "Title".</div><div><cms:jsonpart element="Title${info.resultIndex}">  ${content.value.Title}  </cms:jsonpart></div><div><br></div><div>Have a look at the background to output a log like this:</div><div>Duplicate key for JSON parts:</div><div><br></div><div>Because from the output of your output, the parts part gets 3 data, but the List part is overwritten because it is the same KEY ("Title").</div><div>In this case, your loop looks like this: Direction3.xml, Direction2.xml, Direction1.xml . . .</div><br><br><br><div>--<br><div><br></div>
<div>缘起法实不可思议也。</div>        
<div style="clear:both"></div></div><div id="divNeteaseMailCard_mailru_css_attribute_postfix"></div><br>在 2019-02-13 13:41:55,"Андрей Диканский" <<a href="mailto:andikk@mail.ru">andikk@mail.ru</a>> 写道:<br> <blockquote id="isReplyContent_mailru_css_attribute_postfix" style="padding-left: 1ex;margin: 0px 0px 0px 0.8ex;border-left: 1px solid rgb(204, 204, 204);">I tried it. I still have "wrong" JSON output:<br><br><pre style="overflow-wrap: break-word;white-space: pre-wrap;" data-mce-style="overflow-wrap: break-word;white-space: pre-wrap;">{"parts":["Title","Title","Title"],"Title":"Title 1"}</pre><br>It seems that <span style="font-family: Arial;font-size: 14px;" data-mce-style="font-family: Arial;font-size: 14px;"><cms:jsonpart> takes only the last one content element for output.</span><br><br><br><blockquote style="border-left: 1px solid rgb(8, 87, 166);margin: 10px;padding: 0px 0px 0px 10px;">
        Среда, 13 февраля 2019, 9:31 +03:00 от 脸谱 <<a href="mailto:afeinet@163.com">afeinet@163.com</a>>:<br>
        <br>
        <div id="">






<div class="js-helper_mailru_css_attribute_postfix js-readmsg-msg_mailru_css_attribute_postfix">
        <style></style>
        <div>
                
                
            <div id="style_15500394640000000024_BODY_mailru_css_attribute_postfix"><div class="class_1550048857_mailru_css_attribute_postfix"><div style="line-height: 1.7;color: rgb(0, 0, 0);font-size: 14px;font-family: Arial;"><div><div>Hi, I have not used the jsonpart tag, but I suggest you use the following code to try to see what the output is.</div><div><br></div></div><div><cms:contentload collector="allInFolder" param="/service/1/Direction-%(number).xml|Direction" preload="true"><br></div><div>  <cms:contentinfo var="info" /></div><div>  <c:if test="${info.resultSize > 0}"></div><div>  <cms:contentload></div>      <%--  This is itself a loop call. It is not sure which part is decided. --%><div>      <cms:contentaccess var="content" /> <%-- This content will change with the loop, so it might be yours Direction1.xml, Direction2.xml, Direction3.xml . . . --%></div><div>      <cms:jsonpart element="Title">  ${content.value.Title}  </cms:jsonpart></div><div>   </cms:contentload></div><div>  </c:if></div><div> </cms:contentload> </div><div><br></div><div><br></div><div><br></div><style style="display:none">.class_1550047378 .class_1550048857_mailru_css_attribute_postfix p{
margin-top:0px;
margin-bottom:0px;
}</style></div><br><br><span title="neteasefooter"><p> </p></span></div></div>
            
                
                    <div>_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank" rel=" noopener noreferrer">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
</div>
                
             
        
                
        </div>

        
</div>


</div>
</blockquote>
<br>
<br>-- <br>Andrew Dikansky<br>
</blockquote></div><br><br><span title="neteasefooter"><p> </p></span></div></div>
            
        
                <base target="_self" href="https://e.mail.ru/">
        </div>

        
</div>


</div>
</blockquote>
<br>
<br>-- <br>Андрей Диканский<br></BODY></HTML>