> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# decode

> decode — Kinetica Node.js API

<ul>
  <li>
    decode(data: string | string\[]): any

    Decodes JSON string(s) into objects.Throws on malformed input, like [decodeRegular](https://docs.kinetica.com/content/api/nodejs/functions/decodeRegular.md) and [decodeNoInfNan](https://docs.kinetica.com/content/api/nodejs/functions/decodeNoInfNan.md) and like the JavaScript API's `GPUdb.decode`. Returning the undecoded string instead would put a string where every response type declares an object, with nothing to signal it.

    #### Parameters

    <ul>
      <li>data: string | string\[]</li>
    </ul>

    #### Returns any

    <ul>
      <li>Defined in [src/utils.ts:25](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/utils.ts#L25)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.