How to call an json [ API ] using core js framework 7?

Hi, i’m trying to call API from my localhost [ Using PHP & Mysql ] but i don’t know the correct way
i already do some code and it’s show me the json on my consol.log but when i try to loop it in my template i can’t
This is my code

<template>

    <div class="page">
        <ul>
            ${items.map((item) => $h`
              <li key=${item.id}>${item.id} - ${item.code}</li>
            `)}
          </ul>
      </div>

</template>
  <script>
    export default () => {
        let ApplicationData = app.request.json('https://localhost/recycle/api/v1/all-collection-orders').then((res) => {
        return res.data;
      });

      const items = [ApplicationData];
      console.log(items);
      return $render;
    }
  </script>

  
1 Like

here => sleepy-ben-pbqj55 - CodeSandbox

2 Likes

Thank you this work for me :smiling_face_with_three_hearts: