• Resolved nobinguyen

    (@nobinguyen)


    Hello, please help me!
    I want to display values in data, example: course_name, teacher_name…

    {
      "success": 1,
      "message": "OK",
      "data": {
        "course": {
          "course_name": "K? x?o phim v?i After Effect cho ngh? d?ng phim ",
          "teacher_name": "H? Tr?ng Huy",
          "url_course": "ky-xao-phim-voi-after-effect-cho-nghe-dung-phim",
          "url_thumnail": "https://static.unica.vn/uploads/images/[email protected]/ky-xao-phim.jpg",
          "price_origin": 600000,
          "price_sale": 399000,
          "category_id": 20,
    .....

    I used the structure below but failed

    
    [jsoncontentimporter url="https://unica.vn/api/getCourse?id=455&token=xxxxxxxxqnw8g&aff_id=5729"
    basenode="data"]
    
    {subloop:course:1}
    <ul><li>{course_name}</li></ul>
    {/subloop:course:1}
    
    [/jsoncontentimporter]
    

    Thanks very much

    • This topic was modified 4 years, 7 months ago by nobinguyen.
    • This topic was modified 4 years, 7 months ago by nobinguyen.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    {/subloop:course}
    instead of
    {/subloop:course:1}

    https://wptest.kux.de/47895-2/

    [jsoncontentimporter url=https://wptest.kux.de/extra/tzr.json basenode=data]
    {subloop:course:-1}

    • {course.course_name}

    {/subloop:course}
    [/jsoncontentimporter]

    Bernhard

    PS: Feel free to vote for my plugin

    Thread Starter nobinguyen

    (@nobinguyen)

    Thanks you

    
    {
        "success": 1,
        "message": "OK",
        "data": {
            "course": {
                "course_name": "H?c nh?y Urban Choreography cho ng??i m?i b?t ??u",
                "teacher_name": "?àm Vinh Hi?n",
                "url_course": "hoc-nhay-urban-choreography-cho-nguoi-moi-bat-dau",
                "url_thumnail": "https://static.unica.vn/upload/images/2019/05/hoc-nhay-urban-chore_1558080313.jpg",
                "price_origin": 700000,
                "price_sale": 549000,
                "category_id": 13,
                "url_video": "https://www.youtube.com/embed/duQV-EIUhBY?rel=0",
                "lessons": [
                    {
                        "id": "30819",
                        "parent_id": "0",
                        "name": "Các ??ng tác riêng l?"
                    },
    

    I cannot derive the values ??in “lessons”. Please help me

    Plugin Author berkux

    (@berkux)

    Try

    [jsoncontentimporter url=https://wptest.kux.de/extra/tzr.json basenode=data]
    {subloop:course:-1}

    • {course.course_name}

    course.lessons:<br>
    {subloop-array:course.lessons:-1}
    course.lessons.id: {course.lessons.id}
    {/subloop-array:course.lessons}
    {/subloop:course}
    [/jsoncontentimporter]

    Thread Starter nobinguyen

    (@nobinguyen)

    Thanks very much, I did it

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Value display’ is closed to new replies.