Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

80
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda