• Resolved musicaljoeker

    (@musicaljoeker)


    Hello,

    Currently I have my base array called posts (see json object here). I want to be able to select just the first, or the second, or the nth element. I do not see any documentation on how to do this. I would assume it is something like this: basenode="posts[2]", but I haven’t been able to figure this out.

    Please let me know if there is a way to do this.

    Thank you,
    Joseph

    https://ww.wp.xz.cn/plugins/json-content-importer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author berkux

    (@berkux)

    Hi Joseph,

    the free plugn can’t do this.
    The pro-version can do this by using twig.

    Bernhard

    Plugin Author berkux

    (@berkux)

    Thread Starter musicaljoeker

    (@musicaljoeker)

    Thank you very much for your quick response! I appreciate it very much 🙂

    Thread Starter musicaljoeker

    (@musicaljoeker)

    Hello Bernhard,

    I’ve purchased the pro-version of the plugin, and I’m now having some problems getting the data to come into my site. Here is my code:

    [jsoncontentimporterpro url="http://www.uwosh.edu/today/api/get_tag_posts/?tag_slug=cols" parser="twig"]
    <h2><a href="http://www.uwosh.edu/today/tag/cols/" target="_blank">COLS News</a></h2>
    <div class="story-name">{{posts[3].title}}</div>
    <div class="story-excerpt">{{posts[3].excerpt}} <a href="{{posts[3].url}}">Read more</a></div>
    [/jsoncontentimporterpro]

    I’ve double checked my installation of the pro plugin. I’ve entered the registration ID. Everything looks good, but I’m still getting a data not available error.

    Plugin Author berkux

    (@berkux)

    let’s switch to mail, as this is a PRO-plugin issue.
    see your mails..

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Selecting a single (non-first element) from basenode array’ is closed to new replies.