Skip to content

No Key for relevant data from response object #5

@dougbutner

Description

@dougbutner

The API returns an unkeyed value for the actual data requested, one of which is the array that usually comes with a key like "data" or something. Because of the lack of this key, it's slightly more difficult to get the results needed.

Using topholders endpoint

Here's a workaround for anyone it helps

let resLen = Object.keys(response).length;
response = response[Object.keys(response)[--resLen]];

It would help to have this key, though adding it now may break everyone's code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions