---
url: "https://vueda.dev/v3/reference/api/js/utils/fetchSupport/functions/getJsonOrText.md"
title: "getJsonOrText"
---

# getJsonOrText

## Overview

Fetches a URL and returns the response.

## Signature

`getJsonOrText(response)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-response">response</span> | `Response` | yes | The object to convert. |

### Returns

`Promise`

Either the JSON data or the text data.

## Source

`client/lib/utils/fetchSupport.js:14`
