• Resolved manudrago

    (@manudrago)


    In my json file I have the same course twice in the same day and I want to remove the second one.
    Example:
    Jamf 200 – 24 Oct 2022 – 27 Oct 2022 – Central Standard Time – seats 3
    Jamf 200 – 24 Oct 2022 – 27 Oct 2022 – Central Standard Time – seats full
    here my code, how do I do that

    <table>
    <tbody>
    [jsoncontentimporter url="https://emanueldraghetti.com/jamf.json" oneofthesewordsmustbein="JAMF 200" oneofthesewordsmustbeindepth=2 numberofdisplayeditems=50]
    <tr>
    <td>{course}</td>
    <td><strong>{startDate} - {endDate}</strong></td>
    <td class="{timezone}">{timezone}</td>
    <td class="{availableCapacity}-hide"><span style="display: none;">{availableCapacity}</span><a class="btntable" href="https://www.jamf-training-influential.com/contact/">Book Now</a></td>
    </tr>
    [/jsoncontentimporter]</tbody>
    </table>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    try this with oneofthesewordsmustnotbein=”FULL” oneofthesewordsmustnotbeindepth=2

    <table>
    <tbody>
    [jsoncontentimporter url="https://emanueldraghetti.com/jamf.json" oneofthesewordsmustbein="JAMF 200" oneofthesewordsmustbeindepth=2 oneofthesewordsmustnotbein="FULL" oneofthesewordsmustnotbeindepth=2 numberofdisplayeditems=50]
    <tr>
    <td>{course}</td>
    <td><strong>{startDate} - {endDate}</strong></td>
    <td class="{timezone}">{timezone}</td>
    <td class="{availableCapacity}-hide">
    availableCapacity: {availableCapacity}
    
    <span style="display: none;">{availableCapacity}</span><a class="btntable" href="https://www.jamf-training-influential.com/contact/">Book Now</a></td>
    </tr>
    [/jsoncontentimporter]</tbody>
    </table>

    Bernhard

    Thread Starter manudrago

    (@manudrago)

    Hi, thanks for your answer.
    I don’t have to remove it because it’s full.
    I just need to keep one course for each date available (it doesn’t matter if it’s full or not), perhaps the one with more seats available
    example:
    Jamf 200 – 24 Oct 2022 – 27 Oct 2022 – Central Standard Time – seats 3
    Jamf 200 – 24 Oct 2022 – 27 Oct 2022 – America Standard Time – seats 6

    in this case I have to show only the second one, but if is not possible, the first one is fine as well.

    • This reply was modified 2 years, 5 months ago by manudrago.
    Plugin Author berkux

    (@berkux)

    Hi,

    you either change the JSON or you need the pro JCI-plugin.
    Questions on the pro at
    https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no
    only.

    Best
    Bernhard

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove duplicate course’ is closed to new replies.