method Key.prototype.serialized
Key.prototype.serialized(): { namespace: string | undefined; path: (string | Int)[]; }

Access the serialized property for a library-compatible way to re-use a key.

Examples

Example 1

const key = datastore.key({
  namespace: 'My-NS',
  path: ['Company', 123]
});

// Later...
const key = datastore.key(key.serialized);

Return Type

{ namespace: string | undefined; path: (string | Int)[]; }

Usage

import { Key } from ".";