Skip to content

I get TypeError: Cannot create property 'id' on string 'role-1' when use array of strings for an endpoint #1709

@peshoicov

Description

@peshoicov

The JSON is like so:

{ "roles": ['role-1', 'role-2']}

But when I try to run json-server on such json I get:

TypeError: Cannot create property 'id' on string 'role-1'

Any way to overcome this?

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