Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

74
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!