Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

79
Visualizações
Javascript fetch method doesn't get all the JSON data

I'm trying to fetch data from Prepr.io to my program and I want to filter on an object item. The problem what i'm facing is that i dont get all the objects in Javascript/React Native. When i'm doing the exact same request in Postman i got both the objects and when i'm doing the request in Javascript/React Native i only get one object. I want to get both the objects in Javascript but i have no idea of how i can fix this.

Javascript/React Native Fetch request:

const getVideoData = () => {
        fetch('https://cdn.prepr.io/publications?fields=items{file{cdn_files},image{cdn_files}}', {
            method: 'get',
            headers: {
                Authorization: 'Bearer abcdefg'
            }
        })
            .then((r) => r.json())
            .then((r) => {
                console.log(r)

            })
            .catch((e) => {
                console.log(e)
            });
    };

Javascript/React Native Expo Output:

"beschikbaar_op_route": Object {
            "items": Array [
              Object {
                "body": "Route Groningen Stadspark",
                "changed_on": "2022-03-16T14:46:33+00:00",
                "created_on": "2022-02-28T12:13:10+00:00",
                "id": "a3758c72-1074-4385-884e-34c4bd7d6e1d",
                "label": "Tag",
                "slug": "route-groningen-stadspark",
              },

Postman Request: Request image Postman Output:

"beschikbaar_op_route": {
                        "items": [
                            {
                                "id": "a3758c72-1074-4385-884e-34c4bd7d6e1d",
                                "created_on": "2022-02-28T12:13:10+00:00",
                                "changed_on": "2022-03-16T14:46:33+00:00",
                                "label": "Tag",
                                "body": "Route Groningen Stadspark",
                                "slug": "route-groningen-stadspark"
                            },
                            {
                                "id": "cc3cbe4b-536a-40e7-b69b-8bdddc24d445",
                                "created_on": "2022-02-28T12:13:28+00:00",
                                "changed_on": null,
                                "label": "Tag",
                                "body": "Route Leeuwarden Kalverdijkje",
                                "slug": "route-leeuwarden-kalverdijkje"
                            }
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda